Can't browse messages in an ActiveMQ based Message Store with WSO2 ESB console

StackOverflow https://stackoverflow.com/questions/21761265

  •  11-10-2022
  •  | 
  •  

Frage

I've configured a JMS Message Store in WSO2 ESB 4.8.1, based on ActiveMQ 5.9

Configuration is OK, I can store and dequeue messages in/from this Store and see those messages in ActiveMQ console (number of messages, list of Message ID, ...)

However, I can't see them with WSO2 management console : number of messages is "Not Applicable", "No messages found" instead of the list of messages inside the store

Same result when using ActiveMQ 5.7 (with jars from this distribution into ESB/repository/components/lib).

It was working with ESB v4.5.1 : I could see the list and delete a message, view a message body, ...

If someone manages to configure this, I would be happy to recieve information on how they did it.

War es hilfreich?

Lösung 2

I am facing same issue.

Tested with:

  • WSO2 ESB 4.8.1
  • WSO2 MB 2.1.0 and ActiveMQ 5.5.1

If I use WSO2 MB as broker, I have to create manually the queue in WSO2 MB side to store the messages. In ActiveMQ the queue is automatically created.

I hope this info be useful to solve the error.

Andere Tipps

This answer will not directly address the question but it will show you how you can view the content of the ObjectMessages from a WSO2 message store's JMS queue within ActiveMQ console. This is especially important when the processor reading from the store fails to process the message and you need to know what that message contains in order to further debug your problem.

If you're not modifying anything on the ActiveMQ side and you're trying to view the message details from a store's JMS queue, you get the following exception due to WSO2-side serialization:

javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: org.apache.synapse.message.store.impl.jms.StorableMessage

I have found the StorableMessage class in the synapse-core_2.1.2.wso2v4.jar (ESB_ROOT/repository/components/plugins). If you only deploy that jar to ACTIVEMQ_ROOT/lib without modifications, you will only get the return of the Object's toString() method, which is not helpful.

  1. So what you can do is either reverse engineer the StorableMessage class from the jar OR get a version of StorableMessage and add the following to it:

    @Override
    public String toString() {
        return axis2message.getSoapEnvelope();
    }
    

    and

    private static final long serialVersionUID = 319132393668950267L;
    

    I set that serialVersionUID to the long value set on the WSO2 side upon serialization after getting an error about mismatching IDs in the ActiveMQ console when trying to view the message details. This might change with each upgrade of the ESB as it is most likely set by the JVM since I didn't see one specifically defined in the source code. If that's the case, the StorableMessage class will need to be changed to reflect the new ID.

  2. Build the modified class using the same jar for classpath:

    javac -cp synapse-core_2.1.2.wso2v4.jar StorableMessage.java
    

    You can use a zip utility or the jar command to add (overwrite) the new StorableMessage class to the synapse-core_2.1.2.wso2v4.jar file.

  3. Last step is to deploy the updated jar to the ACTIVEMQ_ROOT/lib directory and bounce ActiveMQ server.

I hope this helps someone. :)

I'm using WSO2 EI 6.5.0 with Activemq 5.16.3. facing same kinda issue, unable to view message in Activemq page console.

As per this doc, added below line in windows.bat file which resolved my issue.

org.apache.activemq.SERIALIZABLE_PACKAGES="*"
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top