1

I am using IBM.XMS .NET library to write messages to the message queue. I need to set up "last message in group" flag to true.

textMessage.SetBooleanProperty("JMS_IBM_LAST_MSG_IN_GROUP", true);

I got following error message in this line of code: "The property name JMS_IBM_LAST_MSG_IN_GROUP is reserved and cannot be set. The supplied property name begins with the JMS prefix, but is not one of the supported, settable properties. Check the property name and correct errors." Do I have any possibility to change this flag from the code? Thanks.

JoshMc
  • 10,239
  • 2
  • 19
  • 38
Yuri Dorokhov
  • 716
  • 5
  • 24

1 Answers1

1

You are using a property whose name begins with "JMS". As per section 3.5.10 of JMS specification "JMS reserves the ‘JMS_’ property name prefix for provider specific properties. Each provider defines their own value of . This is the mechanism a JMS provider uses to make its special per message services available to a JMS client.

I suggest you use the XMS defined names or your property with name not beginning with "JMS". Below is a working snippet.

        var msg = session.CreateTextMessage();
        msg.SetStringProperty(XMSC.JMSX_GROUPID, "ABCDEFGKILDD");
        msg.SetBooleanProperty(XMSC.JMS_IBM_LAST_MSG_IN_GROUP, true);
        msg.Text = "Message in group";
        prod.Send(msg);
Shashi
  • 14,980
  • 2
  • 33
  • 52
  • I use RfhUtil to browse messages. "Group ID" property is still "0000..." and flags in "Group" category is still unchecked. Custom properties is empty as well. Do you have any suggestion how to solve it? – Yuri Dorokhov Sep 05 '16 at 11:06
  • Can you post your code? The sample I posted works, group ID is correctly set. I use MQ v9. – Shashi Sep 05 '16 at 11:10
  • My code exact the same as yours. Unfortunately, I am not able to check MQ version. Thanks for your help. – Yuri Dorokhov Sep 05 '16 at 11:16
  • Version is 7.5.0.4 – Yuri Dorokhov Sep 05 '16 at 11:22
  • I can't think of any reason for group ID being zero. Don't think rfhutil has a problem. Are you sure you are looking at the right message? – Shashi Sep 05 '16 at 11:50
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/122664/discussion-between-yuri-dorokhov-and-shashi). – Yuri Dorokhov Sep 05 '16 at 12:09