You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Marko111 <ma...@yahoo.com> on 2008/08/25 14:47:26 UTC
NMS and message groups
Hi everyone,
I am having a problem with message groups. Can someone please send me an
example of how to use message grouping feature with NMS. I tried using
"NMSXGroupID" property like this:
IMessage message1 = producer.CreateTextMessage("Message Body");
message1.Properties["NMSXGroupID"] = "Group 1";
IMessage message2 = producer.CreateTextMessage("Message Body");
message1.Properties["NMSXGroupID"] = "Group 1";
IMessage message3 = producer.CreateTextMessage("Message Body");
message1.Properties["NMSXGroupID"] = "Group 2";
producer.Send(message1);
producer.Send(message2);
producer.Send(message3);
I created two consumer applications but first consumer receives message1 and
then second consumer receives receives message2 but message1 and message2
have the same group id!
Please help
--
View this message in context: http://www.nabble.com/NMS-and-message-groups-tp19143221p19143221.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS and message groups
Posted by Vadim Chekan <ko...@gmail.com>.
Actually why GroupID is not in IMessage?
On Tue, Aug 26, 2008 at 6:22 AM, James Strachan
<ja...@gmail.com> wrote:
> 2008/8/26 Marko111 <ma...@yahoo.com>:
>>
>> Thanks,
>>
>> I have solved my problem with ActiveMQMessage object.
>
> Great thanks for the heads up!
>
>
>> I will agree we should raise JIRA for this.
>
> done
> https://issues.apache.org/activemq/browse/AMQNET-108
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
--
>From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT
is explicitly specified
Re: NMS and message groups
Posted by James Strachan <ja...@gmail.com>.
2008/8/26 Marko111 <ma...@yahoo.com>:
>
> Thanks,
>
> I have solved my problem with ActiveMQMessage object.
Great thanks for the heads up!
> I will agree we should raise JIRA for this.
done
https://issues.apache.org/activemq/browse/AMQNET-108
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: NMS and message groups
Posted by Marko111 <ma...@yahoo.com>.
Thanks,
I have solved my problem with ActiveMQMessage object.
I will agree we should raise JIRA for this.
James.Strachan wrote:
>
> Am wondering if this is a bug. There's a definite property on the
> ActiveMQMessage.NMSXGroupID.
>
> e.g.
>
> ActiveMQMessage msg = ...
> msg.NMSXGroupID = "Group1";
>
> Maybe the properties in IMessage.Properties are not correctly copied
> across to the right property?
>
> Taking a look at MessagePropertyHelper - it seems the
> GetObjectProperty / SetObjectProperty need to use introspection to
> determine all the available properties on the ActiveMQMessage class
> and call the correct property setter method - rather than passing them
> in the generic properties map.
>
> http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/OpenWire/MessagePropertyHelper.cs?revision=590096&view=markup
>
> We should raise a JIRA for this
>
> 2008/8/25 Marko111 <ma...@yahoo.com>:
>>
>> Hi everyone,
>>
>> I am having a problem with message groups. Can someone please send me an
>> example of how to use message grouping feature with NMS. I tried using
>> "NMSXGroupID" property like this:
>>
>> IMessage message1 = producer.CreateTextMessage("Message Body");
>> message1.Properties["NMSXGroupID"] = "Group 1";
>>
>> IMessage message2 = producer.CreateTextMessage("Message Body");
>> message1.Properties["NMSXGroupID"] = "Group 1";
>>
>> IMessage message3 = producer.CreateTextMessage("Message Body");
>> message1.Properties["NMSXGroupID"] = "Group 2";
>>
>> producer.Send(message1);
>> producer.Send(message2);
>> producer.Send(message3);
>>
>> I created two consumer applications but first consumer receives message1
>> and
>> then second consumer receives receives message2 but message1 and message2
>> have the same group id!
>>
>> Please help
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/NMS-and-message-groups-tp19143221p19143221.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
>
--
View this message in context: http://www.nabble.com/NMS-and-message-groups-tp19143221p19161864.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS and message groups
Posted by Jim Gomes <e....@gmail.com>.
Hopefully, it is working now. It definitely wasn't before, though.
I'm OK with leaving the NMSXGroupID as-is for now. It can be set on the
IMessage interface now, so the functionality is there.
On Wed, Aug 27, 2008 at 7:52 AM, James Strachan <ja...@gmail.com>wrote:
> 2008/8/27 Jim Gomes <e....@gmail.com>:
> > Hi James,
> >
> > There was an implementation gap on this area. I refactored this area of
> the
> > code. Feel free to look over it to make sure I did things right. I
> wanted
> > to make the IMessage.Properties transparent to use and interchangeable
> with
> > the SetObjectProperty/GetObjectProperty functions.
>
> Ah cool! Maybe its not working then? :)
>
> > A user should now be able to set the extended properties on
> ActiveMQMessage
> > from the IMessage.Properties interface by matching the property names.
> >
> > I am surprised that the NMSXGroupID is not part of the main IMessage
> > interface, as I think it is part of the JMS spec (JMSXGroupID), isn't it?
>
> Yeah - maybe we could move NMSXGroupID to the IMessage interface?
> Given the NMSX prefix its marked as an optional header a provider may
> support etc
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
Re: NMS and message groups
Posted by James Strachan <ja...@gmail.com>.
2008/8/27 Jim Gomes <e....@gmail.com>:
> Hi James,
>
> There was an implementation gap on this area. I refactored this area of the
> code. Feel free to look over it to make sure I did things right. I wanted
> to make the IMessage.Properties transparent to use and interchangeable with
> the SetObjectProperty/GetObjectProperty functions.
Ah cool! Maybe its not working then? :)
> A user should now be able to set the extended properties on ActiveMQMessage
> from the IMessage.Properties interface by matching the property names.
>
> I am surprised that the NMSXGroupID is not part of the main IMessage
> interface, as I think it is part of the JMS spec (JMSXGroupID), isn't it?
Yeah - maybe we could move NMSXGroupID to the IMessage interface?
Given the NMSX prefix its marked as an optional header a provider may
support etc
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: NMS and message groups
Posted by Jim Gomes <e....@gmail.com>.
Hi James,
There was an implementation gap on this area. I refactored this area of the
code. Feel free to look over it to make sure I did things right. I wanted
to make the IMessage.Properties transparent to use and interchangeable with
the SetObjectProperty/GetObjectProperty functions.
A user should now be able to set the extended properties on ActiveMQMessage
from the IMessage.Properties interface by matching the property names.
I am surprised that the NMSXGroupID is not part of the main IMessage
interface, as I think it is part of the JMS spec (JMSXGroupID), isn't it?
Best,
Jim
On Tue, Aug 26, 2008 at 12:42 AM, James Strachan
<ja...@gmail.com>wrote:
> Am wondering if this is a bug. There's a definite property on the
> ActiveMQMessage.NMSXGroupID.
>
> e.g.
>
> ActiveMQMessage msg = ...
> msg.NMSXGroupID = "Group1";
>
> Maybe the properties in IMessage.Properties are not correctly copied
> across to the right property?
>
> Taking a look at MessagePropertyHelper - it seems the
> GetObjectProperty / SetObjectProperty need to use introspection to
> determine all the available properties on the ActiveMQMessage class
> and call the correct property setter method - rather than passing them
> in the generic properties map.
>
>
> http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/OpenWire/MessagePropertyHelper.cs?revision=590096&view=markup
>
> We should raise a JIRA for this
>
> 2008/8/25 Marko111 <ma...@yahoo.com>:
> >
> > Hi everyone,
> >
> > I am having a problem with message groups. Can someone please send me an
> > example of how to use message grouping feature with NMS. I tried using
> > "NMSXGroupID" property like this:
> >
> > IMessage message1 = producer.CreateTextMessage("Message Body");
> > message1.Properties["NMSXGroupID"] = "Group 1";
> >
> > IMessage message2 = producer.CreateTextMessage("Message Body");
> > message1.Properties["NMSXGroupID"] = "Group 1";
> >
> > IMessage message3 = producer.CreateTextMessage("Message Body");
> > message1.Properties["NMSXGroupID"] = "Group 2";
> >
> > producer.Send(message1);
> > producer.Send(message2);
> > producer.Send(message3);
> >
> > I created two consumer applications but first consumer receives message1
> and
> > then second consumer receives receives message2 but message1 and message2
> > have the same group id!
> >
> > Please help
> >
> >
> > --
> > View this message in context:
> http://www.nabble.com/NMS-and-message-groups-tp19143221p19143221.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
Re: NMS and message groups
Posted by James Strachan <ja...@gmail.com>.
Am wondering if this is a bug. There's a definite property on the
ActiveMQMessage.NMSXGroupID.
e.g.
ActiveMQMessage msg = ...
msg.NMSXGroupID = "Group1";
Maybe the properties in IMessage.Properties are not correctly copied
across to the right property?
Taking a look at MessagePropertyHelper - it seems the
GetObjectProperty / SetObjectProperty need to use introspection to
determine all the available properties on the ActiveMQMessage class
and call the correct property setter method - rather than passing them
in the generic properties map.
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/OpenWire/MessagePropertyHelper.cs?revision=590096&view=markup
We should raise a JIRA for this
2008/8/25 Marko111 <ma...@yahoo.com>:
>
> Hi everyone,
>
> I am having a problem with message groups. Can someone please send me an
> example of how to use message grouping feature with NMS. I tried using
> "NMSXGroupID" property like this:
>
> IMessage message1 = producer.CreateTextMessage("Message Body");
> message1.Properties["NMSXGroupID"] = "Group 1";
>
> IMessage message2 = producer.CreateTextMessage("Message Body");
> message1.Properties["NMSXGroupID"] = "Group 1";
>
> IMessage message3 = producer.CreateTextMessage("Message Body");
> message1.Properties["NMSXGroupID"] = "Group 2";
>
> producer.Send(message1);
> producer.Send(message2);
> producer.Send(message3);
>
> I created two consumer applications but first consumer receives message1 and
> then second consumer receives receives message2 but message1 and message2
> have the same group id!
>
> Please help
>
>
> --
> View this message in context: http://www.nabble.com/NMS-and-message-groups-tp19143221p19143221.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com