I understand. But I was wondering if web console can just show (or not show) the raw binary content and serialization/deserialization happen only on the client. That way the message content is not human readable in the web console. I ran across IObjectMessage & CreateObjectMessage and tried it.
IObjectMessage objmsg = session.CreateObjectMessage(bytes); producer.Send(objmsg, MsgDeliveryMode.Persistent, MsgPriority.Lowest, TimeSpan.Zero); With this, I see that the webconsole's message details says " Cannot display ObjectMessage body. Reason: Failed to build body from bytes. Reason: java.io.StreamCorruptedException: invalid stream header: 00010000" But at the client I can still take the bytes and do what I need to. Yet to fully vet this out. -----Original Message----- From: Tim Bain <[email protected]> Sent: Tuesday, February 1, 2022 7:38 AM To: ActiveMQ Users <[email protected]> Subject: Re: ActiveMQ Web Console - Prevent display of sensitive content? ################################################################################################# Warning: This email originated from outside of the Allscripts email system. External Sender Address: users-return-54115-Sundar.Pattamadai=allscripts....@activemq.apache.org ################################################################################################# If you want to prevent messages from being read by people other than the intended recipient, whether on the web console or elsewhere, the standard way to do that is to encrypt the message when sending and then have the intended recipient decrypt it upon receipt. Or you can limit access to the web console to only trusted admins who are allowed to see these messages. Tim On Mon, Jan 31, 2022, 10:18 PM Pattamadai, Sundar < [email protected]> wrote: > Hello, > We binary serialize a C# object (which contains soap XML) and store it > into a queue using ActiveMQBytesMessage class. (We are a .net/c# shop > hence using activemq nms .net client against activemq 5.16.3) > > Snippet here as an example. > > byte[] msgBytes = payload.Content as byte[]; //payload is our C# > object > > using (ISession session = connection.CreateSession()) { > IMessageProducer prod = session.CreateProducer( > new > Apache.NMS.ActiveMQ.Commands.ActiveMQQueue(queueName)); > ActiveMQBytesMessage aqbytes = new ActiveMQBytesMessage(); > aqbytes.Content = msgBytes; > IMessage msg = aqbytes; > msg.NMSDeliveryMode = MsgDeliveryMode.Persistent; > prod.Send(msg); > } > > Now in the ActiveMQ web console, when viewing the message, the message > details box shows the bytes content mostly in plain text. We have some > sensitive information we don't want it displayed in plain text. Are > there any options in the web console to accomplish this? Or some other > approach? > > >
