I like option one; a map with a list seems very unwieldy. Option three
isn't terrible, and I like it the more I think about it.

On Thu, Aug 30, 2012 at 10:28 AM, Rajith Attapattu <[email protected]> wrote:
> Hi All,
>
> There have been a need for a ListMessage support with JMS particularly
> among the folks who are using QMFv2.
> We have been exploring several ways of providing this and would like
> to solicit feedback from the user community.
> Following is a summary of the options.
>
> 1. Make the list message accessible via the MapMessage and
> StreamMessage interfaces.
>     The keys in the MapMessage are going to be indices.
>
>     if (m instanceof MapMessage) {
>     MapMessage map = (MapMessage) m;
>     for (String key : map.getMapNames()) {
>       Object value = map.getObject(key);
>       //process value
>     }
>   }
>
>   One could also access them by position by doing map.getObject("1")
> ... map.getObject("5")  ..etc
>
> 2. Make it available as a MapMessage but provide a java.util.List as a
> single entry in the map.
>
>    for (Object o : (List) map.getObject("map/list"))
>    {
>       // Process
>    }
>
> 3. Another option (which can be used along side both the above) is to
> introduce a ListMessage interface.
>     This is for folks who don't mind using a Qpid specific interface.
>
>     if (m instanceof ListMessage)
>     {
>          for (Object o : m.getList())
>          {
>              // Process
>          }
>      }
>
>   There has been a patch which implements Option #1 and #3 here
> https://issues.apache.org/jira/secure/attachment/12519423/0001-java-ListMessage-support.patch
>
>   There is a discussion on review board about a patch on Option #2
> here https://reviews.apache.org/r/6816/
>
> Please feel free to provide feedback and make known your preferences.
> Also please feel free to provide your own approach to tackling the
> problem if you feel the above options doesn't address it adequately.
>
> Regards,
>
> Rajith
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Joseph B. Ottinger
http://enigmastation.com
Ça en vaut la peine.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to