Reputation: 726
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.
Upvotes: 1
Views: 707
Reputation: 15273
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);
Upvotes: 1