Bug 777709 (SOA-225)

Summary: NotifyTopics = message not written to topic
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Len DiMaggio <ldimaggi>
Component: JBossESBAssignee: tcunning
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.2 IR8CC: daniel.bevenius
Target Milestone: ---   
Target Release: 4.2 IR9   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-225
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
jboss-soa-p-standalone.4.2.0 RHEL5
Last Closed: 2007-12-17 13:58:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
wiretap.tar
none
GetJMSMessage.java none

Description Len DiMaggio 2007-12-07 21:13:59 UTC
Date of First Response: 2007-12-07 17:29:43
project_key: SOA

Description of problem:

Test suggested by Burr - try replacing NotifyQueues with NotifyTopics - it was reported to Burr that the message was never written to the target topic. 

Version-Release number of selected component (IR or RC #, component ver)
jboss-soa-p-standalone.4.2.0

How reproducible:
100%

Steps to Reproduce: 
1. Replace call to NotifyQueues with NotifyTopics - for example - in a quickstart - modified wiretap quickstart is attached.

Actual results:

15:47:29,852 ERROR [NotificationList] Can't instantiate target <target class="NotifyTopics">
                                                        <messageProp name="burrtest" value="burrtest2"/>
                           <queue jndiName="queue/burrtest2"/>
                       </target>
java.lang.ArrayIndexOutOfBoundsException: 0
        at org.jboss.soa.esb.notification.NotifyJMS.sendNotification(NotifyJMS.java:287)
        at org.jboss.soa.esb.notification.NotificationList.notifyAll(NotificationList.java:164)
        at org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMethodInfo.java:165)
        at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.processSuccess(OverriddenActionLifecycleProcessor.java:108)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipeline.java:610)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:384)
        at org.jboss.soa.esb.listeners.message.MessageAwareListener$1.run(MessageAwareListener.java:303)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

Expected results:
The message should be written to the topic.

Additional info: (e.g., stack trace)

It didn't make a difference if I defined the target topic as:

  <depends>jboss.esb.quickstart.destination:service=Queue,name=test1</depends>

or

  <depends>jboss.esb.quickstart.destination:service=Topic,name=test2</depends>

Comment 1 Len DiMaggio 2007-12-07 21:14:58 UTC
Attachment: Added: wiretap.tar


Comment 2 Daniel Bevenius 2007-12-07 22:29:43 UTC
Hi,

You need to specify that topics are to be used:
<target class="NotifyTopics">
            <messageProp name="burrtest" value="burrtest2"/>
            <topic jndiName="queue/burrtest2"/>
</target> 
This is why the exception above is being generated.

But I still can't see that the message is available in the jmx-console. I'll post back if I come up with anything.

/Daniel

Comment 3 Len DiMaggio 2007-12-08 02:47:14 UTC
Attachment: Removed: wiretap.tar 


Comment 4 Len DiMaggio 2007-12-08 02:48:30 UTC
Corrected attachment - thanks Daniel - I missed that one - but, as you say, the message is not written to the topic...

Comment 5 Len DiMaggio 2007-12-08 02:48:30 UTC
Attachment: Added: wiretap.tar


Comment 6 Daniel Bevenius 2007-12-10 08:02:59 UTC
Hmm, I've tried creating a standalone client that posts a message to a topic in the same way that the NotifyTopics class does. It then tries to retrieve from that same topic but without success. The message does not seem to reach the topic (can't be seen in the jmx-console either).
I'll see if I can modify the client to get it working and post back.




Comment 7 Daniel Bevenius 2007-12-10 16:06:32 UTC
Just posted the test client I've been using. I configured the topic for this by modifying the topic definition in jboss-messaging.sar/destination-service.xml:
<mbean code="org.jboss.jms.server.destination.TopicService"
      name="jboss.messaging.destination:service=Topic,name=testDurableTopic"
      xmbean-dd="xmdesc/Topic-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
      <depends>jboss.messaging:service=PostOffice</depends>
      <attribute name="SecurityConfig">
         <security>
            <role name="guest" read="true" write="true" create="true"/>
            <role name="publisher" read="true" write="true" create="false"/>
            <role name="durpublisher" read="true" write="true" create="true"/>
         </security>
      </attribute>
   </mbean>



Comment 8 Daniel Bevenius 2007-12-10 16:06:32 UTC
Attachment: Added: GetJMSMessage.java


Comment 9 tcunning 2007-12-11 00:19:14 UTC
Link: Added: This issue is a dependency of JBESB-1402


Comment 10 tcunning 2007-12-11 00:21:54 UTC
I've added a helloworld_topic_notifier QS based on work that Daniel Bevenius and I did that demonstrates that NotifyTopic seems to work.     The wiretap.tar that's attached here doesn't actually subscribe to a topic, so I'm not sure it is a valid test case.     See linked bug for changes.

Comment 11 Len DiMaggio 2007-12-11 16:24:26 UTC
Closing the JIRA.