Besides using the Weblogic Console to add subscribers (durable) to our topics we can also use QBrowser to browse queues and topics on your Weblogic Server.
Download the tool here, configurate the .bat/.sh so all the correct versions of the jar are included or create the Weblogic Full Client (http://download.oracle.com/docs/cd/E12840_01/wls/docs103/client/t3.html).
Connect to your Weblogic instance.
You will get an overview of all your queues and topic, and also our MyTopic.
Click on the topic to add a subscription to the topic.
We haven’t created a Local Store yet, so select the default ‘Not Copy to local store’, we will do that later on.
Create a message on topic by your testclient (or in my case, my OSB process) and watch QBrowser again, to see the message coming in.
So we’re able to add a subscriber on the topic to read the messages.
When we go back to the Weblogic Console and check the Durable Durable Subscribers tab, we still see only 1 subscriber, the one we created in this blog.
QBrowser created a non-durable subscriber for us on the topic.
Let’s do a little test.
Send again the message from the client and click ‘resume subscribe’.
The just sended message isn’t stored in the topic. This because we used a non-durable subscriber on the topic, so in case of a disconnect the messages won’t get persisted.
Local Store
QBrowser also gives the option to define ‘Local Store’.
Create a new Local Store by clicking on it
Add the Local Store to the topic
Trigger your client again (or in my case the OSB process) to send a new message.
The message arrives again the QBrowser in the list of messages of the topic and on filesystem QBrowser stored a new zip-archive at the defined location of the Local Store (d:\tmp\temp_store\ID323778.1308261513812.0_TextMessage.zip in my case)
The zip contains the next files:
JMSHeaders.txt
[sourcecode language=”xml”]
“JMSMessageID”,String=<@begin-@string@>ID:<323778.1308261513812.0><@end-@string@>
“JMSDestination”,String=<@begin-@string@>MyTopic : Topic<@end-@string@>
“JMSReplyTo”,String=<@begin-@string@><@end-@string@>
“JMSCorrelationID”,String=<@begin-@string@>null<@end-@string@>
“JMSDeliverMode”,Int=”2″
“JMSPriority”,Int=”4″
“JMSExpiration”,Long=”0″
“JMSType”,String=<@begin-@string@>null<@end-@string@>
“JMSRedelivered”,Boolean=”false”
“JMSTimestamp”,Long=”1308261513812″
[/sourcecode]
textbodysize
[sourcecode language=”xml”]
70
[/sourcecode]
TextMessageBody.txt
[sourcecode language=”xml”]
[/sourcecode]
UserProperties.txt
[sourcecode language=”xml”]
“JMSXDeliveryCount”,Int=”1″
[/sourcecode]
With this functionality you will be able to store all the incoming messages on the topic on filesystem.
So far the short overview of the possibilities in QBrowser when using topics.
8 Responses to “Weblogic, QBrowser and topics”
Hi Eric,Great article.For subscription here we are using the QBrowser tool,but with weblogic how can to subscribe the message from topic.Any suggestions?
What type of subscriber do you want to add in Weblogic. If you add subscribers from within QBrowser or from a proxy service whichs polls on the topic, Weblogic will deal with the rest. So i’m not sure what you want to add in the Weblogic Console itself
Eric thanks for the quick reply.If I am publish the message (xml document) to Topic how can I subscribe the message based (on xml attribute value)with proxy service.
Think the easiest way is to create some sort of dispatcher proxy service which retrieves all the jms messages and based on the xml payload does some rerouting to either some other queue or to the ‘real’ subscriber/third party/system you want to connect.
Or if you can add jms properties to the message you could use jms selector on the proxy service to select only certain messages for certain subscribers.
Hi Eric,Thanks for the quick reply.I m able to publish the message to the topic and I am try to poll the message with proxy,but can’t.How can I poll the message from it?
You just need to create a proxy service with jms transport, topic type and add the endpoint to the topic.
Then the ps will poll them and process them. Not much to do extra
Hi Eric
By doing this I am get the output what I am pass the input but when I check the total message in topic no change I mean if your polling the message the count should decrease in topic,I am I right?
If it’s a durable subscriper, Weblogic will administer which subscriber received the message from the topic. When all the subscribers have received the message it will get removed from the topic.