Both ActiveMQ 5.x and Artemis have client jars with implementations of
the JMS MapMessage interface, that both happen to be in a class called
ActiveMQMapMessage, but they are independent implementations and live
in different java packages.

What Justin was saying is that the Artemis implementation doesnt
support 'nested lists and maps' extended functionality that 5.x impl
apparently offers. I'm not sure why he asked about that since you
didnt seem to specifically mention it in your original email, maybe
there was some other context. If you aren't using that extended
functionality then you should just be able to use the Artemis
MapMessage implementation, or indeed any JMS client impls MapMessage
that talks to the broker.

Note it is somewhat unusual for application code to directly
instantiate a JMS message implementation object like that, usually you
would do session.createMapMessage() or such like in order to create
the message object in a vendor-neutral and portable fashion, not
needing to know the name or package of the clients message
implementation class, and just using the JMS MapMessage interface for
the returned object. Which in the end is actually all your code does
use for the new mapMessage object after instantiating it, since it is
first assigned to a variable of type MapMessage (though it is unclear
what type the source 'message' object variable is).

On Mon, 30 Jan 2023 at 14:52, Gunawan, Rahman (GSFC-703.H)[Halvik
Corp] <rahman.guna...@nasa.gov.invalid> wrote:
>
> Below is the MapMessage code:
> MapMessage mapMessage = new ActiveMQMapMessage();
>     message.forEach((key, value) -> {
>       try {
>         mapMessage.setObject(key, value);
>       } catch (JMSException e) {
>         LOG.info("Failed to create MapMessage entry with", e);
>       }
>
> I found that ActiveMQMapMessage is under artemis in github 
> https://github.com/apache/activemq-artemis/blob/main/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java.
>   Does it mean ActiveMQMapMessage still under one of the Artemis jar file?
> Thanks
>
> Regards,
> Rahman
>
> -----Original Message-----
> From: Justin Bertram <jbert...@apache.org>
> Sent: Friday, January 27, 2023 4:40 PM
> To: users@activemq.apache.org
> Subject: Re: [EXTERNAL] Re: Artemis API equivalent to ActiveMQMapMessage
>
> It's not supported currently. Is it critical for your use-case? If so, could 
> you elaborate on your use-case?
>
>
> Justin
>
> On Fri, Jan 27, 2023 at 3:28 PM Gunawan, Rahman (GSFC-703.H)[Halvik Corp] 
> <rahman.guna...@nasa.gov.invalid> wrote:
>
> > Yes, that's correct.
> >
> > Rahman
> >
> > -----Original Message-----
> > From: Justin Bertram <jbert...@apache.org>
> > Sent: Friday, January 27, 2023 4:25 PM
> > To: users@activemq.apache.org
> > Subject: [EXTERNAL] Re: Artemis API equivalent to ActiveMQMapMessage
> >
> > Are you talking about the "extension" provided by ActiveMQ "Classic"
> > that allows one to use nested Maps and Lists inside a JMS MapMessage
> > [1] via the setObject method? If not, please clarify.
> >
> >
> > Justin
> >
> > [1]
> > https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs
> > .oracle.com%2Fjavaee%2F7%2Fapi%2Fjavax%2Fjms%2FMapMessage.html&data=05
> > %7C01%7Crahman.gunawan%40nasa.gov%7C649fa57d0e0a454c161b08db00af3e29%7
> > C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638104524895912762%7CUnkno
> > wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
> > CJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TcP%2BSiil0UzMY5C%2FYJocEa7dKDEuh2
> > 6u5t6%2BhHAZE60%3D&reserved=0
> >
> > On Fri, Jan 27, 2023 at 6:46 AM Gunawan, Rahman (GSFC-703.H)[Halvik
> > Corp] < rahman.guna...@nasa.gov.invalid> wrote:
> >
> > > We plan to migrate from ActiveMQ classic to Artemis.  What will be
> > > the Artemis API to replace org.apache.activemq.command.ActiveMQMapMessage?
> > > Thanks
> > >
> > > Regards,
> > > Rahman
> > >
> > >
> >
> >

Reply via email to