Author |
Message
|
GenCode |
Posted: Thu Sep 10, 2015 6:59 am Post subject: Trying to encode to an EBCDIC |
|
|
Novice
Joined: 10 Sep 2015 Posts: 21
|
My messages all have a header on them when my client is reading off the queue, its basically garbled data then at the end is my message.
This only happens when using the XMS library
When I use the amqmdnet it does not happen.
I tried with encoding
Code: |
var message = session.CreateTextMessage();
message.SetStringProperty(XMSC.JMS_IBM_FORMAT, MQC.MQFMT_STRING);
message.SetIntProperty(XMSC.JMS_IBM_ENCODING, 273);
message.Text = "WMQ_CM_CLIENT_UNMANAGED No ENC";// dbmessage.Message;
messagedict.Add(dbmessage.MessageId, message); |
and without
Code: |
var message = session.CreateTextMessage();
message.Text = "WMQ_CM_CLIENT_UNMANAGED No ENC";// dbmessage.Message;
messagedict.Add(dbmessage.MessageId, message); |
amqmdnet looks like this
1234567890 1234567890 1234567890 1234567890 1234567890
XMS looks like this, with my message at the very end
RFH .......y.......4MQSTR .......½....._ÄÀ..(ËÀ.¦_ˬÈÁÌÈ.. (then my message at the end)
[/code] |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 10, 2015 7:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
It's not encoding, nor is it garbled data.
XMS is the non-Java equivalent of JMS and it adds an RFH2 header to the front of the message to store the JMS properties that don't map directly onto the MQMD. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 10, 2015 7:06 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
It's not encoding, nor is it garbled data.
XMS is the non-Java equivalent of JMS and it adds an RFH2 header to the front of the message to store the JMS properties that don't map directly onto the MQMD. |
Unless you tell it not to. Assuming XMS supports targClient ? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 10, 2015 7:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Vitor wrote: |
It's not encoding, nor is it garbled data.
XMS is the non-Java equivalent of JMS and it adds an RFH2 header to the front of the message to store the JMS properties that don't map directly onto the MQMD. |
Unless you tell it not to. Assuming XMS supports targClient ? |
Indeed, and we assume so. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
GenCode |
Posted: Thu Sep 10, 2015 10:33 am Post subject: |
|
|
Novice
Joined: 10 Sep 2015 Posts: 21
|
Thanks, but I am unclear how to what option to change to suppress it.
I am using the .NET version as you probably know from the code.
I am very new to the XMS lib  |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 10, 2015 10:37 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
GenCode |
Posted: Thu Sep 10, 2015 11:26 am Post subject: |
|
|
Novice
Joined: 10 Sep 2015 Posts: 21
|
Fixed, thanks for the info
Here is the fix in case anyone else has this issue.
Code: |
session = connection.CreateSession(false, AcknowledgeMode.AutoAcknowledge);
.
.
.
destination = session.CreateQueue(queue);
destination.SetIntProperty(XMSC.WMQ_TARGET_CLIENT, XMSC.WMQ_TARGET_DEST_MQ); //Prevent automatic RFH (or JMS) headers in messages...
|
|
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Sep 10, 2015 7:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Can also be passed in the URI queue definition
Code: |
String queuename="queue:///MYQUEUE.NAME?targetClient=1";
Queue thisqueue = session.createQueue(queuename); |
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Hamsa |
Posted: Thu Dec 03, 2015 7:09 pm Post subject: Unwanted header and special chars of messages in MQ |
|
|
Newbie
Joined: 03 Dec 2015 Posts: 3
|
GenCode wrote: |
Thanks, but I am unclear how to what option to change to suppress it.
I am using the .NET version as you probably know from the code.
I am very new to the XMS lib  |
HI,
Can you please let me know how you made it work.
Even I'm using .Net xms lib still I have issue with headers and specials chars.
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 04, 2015 5:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
|