Author |
Message
|
starki78 |
Posted: Fri Jan 06, 2012 4:17 am Post subject: Generating Binary Correlation-ID from BigInteger not working |
|
|
Acolyte
Joined: 24 Sep 2007 Posts: 53
|
Hello,
We found out that we can make a successful Correlation with our Business partner (MQ-Series 6) if we set the Correlation-ID
this way:
String corrid = "EDE12333345555"
//setCorrelation ID for sending
correlationID = corrid.getBytes()
It fails this way:
//setCorrelation ID for sending
correlationID = generate();
public static byte[] generate()
{
BigInteger localBigInteger = BigInteger.valueOf(System.currentTimeMillis());
return localBigInteger.toByteArray();
}
Is there any explanation for this, any specification which can justify this?
I did a lot of research and found both combinations being used in the practise.
Thanks a lot
Starki |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 06, 2012 5:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Obvious question = why are you manually generating an id? Why not let the system generate one? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
starki78 |
Posted: Fri Jan 06, 2012 8:06 am Post subject: |
|
|
Acolyte
Joined: 24 Sep 2007 Posts: 53
|
thanks for your feedback.
We are non using WebSphere on the Client-Side but Java and need to implement this manually.
We have a Request-Response sceario
Java--->MQ-Request-Queue-->Custom Code (not changed for 7 years)-->
MQ-Response-Queue-->Java
And we need to understand why only
correlationID =corrid.getBytes()
and especially if this has any documented explanation.
I know that old examples use corrid.getBytes()
but do not understand the difference to the other option |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 06, 2012 8:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Look at the JMS and java base examples for request reply scenario.
They will give you more clarity.
Then post again a clear question. What you have posted so far is more "why does this not work" than "this is our design, what is the flaw in it..."...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
starki78 |
Posted: Fri Jan 06, 2012 8:25 am Post subject: |
|
|
Acolyte
Joined: 24 Sep 2007 Posts: 53
|
I reviewed them several times
over and over.
Sorry I think my question is very clear
but maybe wrong
bye |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 06, 2012 8:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
starki78 wrote: |
I reviewed them several times
over and over.
Sorry I think my question is very clear
but maybe wrong
bye |
Well the answer to your very clear question is that the correlationId is defined as byte[] (MQBYTE[24]). Deal with it! _________________ MQ & Broker admin |
|
Back to top |
|
 |
|