You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Marnie McCormack (JIRA)" <qp...@incubator.apache.org> on 2006/11/16 14:53:37 UTC

[jira] Created: (QPID-103) Implement support for MessageListener interface

Implement support for MessageListener interface
-----------------------------------------------

                 Key: QPID-103
                 URL: http://issues.apache.org/jira/browse/QPID-103
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
            Reporter: Marnie McCormack
             Fix For: M2


See AMQSession.get/setMessageListener methods which currently throw UnsupportedOperationException.

See javadoc/JMS spec.

The snippet below talks a little about the MessageListener interface (from JMS specification):

9.3.1 Receiving Messages Asynchronously

In order to receive message asynchronously as they are delivered to the message consumer, the client program needs to create a message listener that implements the MessageListener interface. An implementation of the MessageListener interface, called StockListener.java, might look like this:

import javax.jms.*;
public class StockListener implements MessageListener
{
public void onMessage(Message message) {
/* Unpack and handle the messages received */
...
}
}
The client program registers the MessageListener object with the MessageConsumer object in the following way:

StockListener myListener = new StockListener();

/* Receiver is MessageConsumer object */
receiver.setMessageListener(myListener);

The Connection must be started for the message delivery to begin. The MessageListener is asynchronously notified whenever a message has been published to the Queue. This is done via the onMessage method in the MessageListener interface. It is up to the client to process the message there.

JMS Example Code—April 12, 2002 105
9
public void onMessage(Message message)
{
String newStockData;
/* Unpack and handle the messages received */
newStockData = message.getText();
if(...)
{
/* Logic related to the data */
}
}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Assigned: (QPID-103) Implement support for MessageListener interface

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie reassigned QPID-103:
-----------------------------------

    Assignee: Martin Ritchie  (was: Tejeswar Das)

> Implement support for MessageListener interface
> -----------------------------------------------
>
>                 Key: QPID-103
>                 URL: https://issues.apache.org/jira/browse/QPID-103
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Marnie McCormack
>         Assigned To: Martin Ritchie
>             Fix For: M2
>
>
> See AMQSession.get/setMessageListener methods which currently throw UnsupportedOperationException.
> See javadoc/JMS spec.
> The snippet below talks a little about the MessageListener interface (from JMS specification):
> 9.3.1 Receiving Messages Asynchronously
> In order to receive message asynchronously as they are delivered to the message consumer, the client program needs to create a message listener that implements the MessageListener interface. An implementation of the MessageListener interface, called StockListener.java, might look like this:
> import javax.jms.*;
> public class StockListener implements MessageListener
> {
> public void onMessage(Message message) {
> /* Unpack and handle the messages received */
> ...
> }
> }
> The client program registers the MessageListener object with the MessageConsumer object in the following way:
> StockListener myListener = new StockListener();
> /* Receiver is MessageConsumer object */
> receiver.setMessageListener(myListener);
> The Connection must be started for the message delivery to begin. The MessageListener is asynchronously notified whenever a message has been published to the Queue. This is done via the onMessage method in the MessageListener interface. It is up to the client to process the message there.
> JMS Example Code?April 12, 2002 105
> 9
> public void onMessage(Message message)
> {
> String newStockData;
> /* Unpack and handle the messages received */
> newStockData = message.getText();
> if(...)
> {
> /* Logic related to the data */
> }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (QPID-103) Implement support for MessageListener interface

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie resolved QPID-103.
---------------------------------

    Resolution: Fixed

Completed: At revision: 499165  


> Implement support for MessageListener interface
> -----------------------------------------------
>
>                 Key: QPID-103
>                 URL: https://issues.apache.org/jira/browse/QPID-103
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Marnie McCormack
>         Assigned To: Martin Ritchie
>             Fix For: M2
>
>
> See AMQSession.get/setMessageListener methods which currently throw UnsupportedOperationException.
> See javadoc/JMS spec.
> The snippet below talks a little about the MessageListener interface (from JMS specification):
> 9.3.1 Receiving Messages Asynchronously
> In order to receive message asynchronously as they are delivered to the message consumer, the client program needs to create a message listener that implements the MessageListener interface. An implementation of the MessageListener interface, called StockListener.java, might look like this:
> import javax.jms.*;
> public class StockListener implements MessageListener
> {
> public void onMessage(Message message) {
> /* Unpack and handle the messages received */
> ...
> }
> }
> The client program registers the MessageListener object with the MessageConsumer object in the following way:
> StockListener myListener = new StockListener();
> /* Receiver is MessageConsumer object */
> receiver.setMessageListener(myListener);
> The Connection must be started for the message delivery to begin. The MessageListener is asynchronously notified whenever a message has been published to the Queue. This is done via the onMessage method in the MessageListener interface. It is up to the client to process the message there.
> JMS Example Code?April 12, 2002 105
> 9
> public void onMessage(Message message)
> {
> String newStockData;
> /* Unpack and handle the messages received */
> newStockData = message.getText();
> if(...)
> {
> /* Logic related to the data */
> }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (QPID-103) Implement support for MessageListener interface

Posted by "Tejeswar Das (JIRA)" <qp...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/QPID-103?page=all ]

Tejeswar Das reassigned QPID-103:
---------------------------------

    Assignee: Tejeswar Das

> Implement support for MessageListener interface
> -----------------------------------------------
>
>                 Key: QPID-103
>                 URL: http://issues.apache.org/jira/browse/QPID-103
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Marnie McCormack
>         Assigned To: Tejeswar Das
>             Fix For: M2
>
>
> See AMQSession.get/setMessageListener methods which currently throw UnsupportedOperationException.
> See javadoc/JMS spec.
> The snippet below talks a little about the MessageListener interface (from JMS specification):
> 9.3.1 Receiving Messages Asynchronously
> In order to receive message asynchronously as they are delivered to the message consumer, the client program needs to create a message listener that implements the MessageListener interface. An implementation of the MessageListener interface, called StockListener.java, might look like this:
> import javax.jms.*;
> public class StockListener implements MessageListener
> {
> public void onMessage(Message message) {
> /* Unpack and handle the messages received */
> ...
> }
> }
> The client program registers the MessageListener object with the MessageConsumer object in the following way:
> StockListener myListener = new StockListener();
> /* Receiver is MessageConsumer object */
> receiver.setMessageListener(myListener);
> The Connection must be started for the message delivery to begin. The MessageListener is asynchronously notified whenever a message has been published to the Queue. This is done via the onMessage method in the MessageListener interface. It is up to the client to process the message there.
> JMS Example Code?April 12, 2002 105
> 9
> public void onMessage(Message message)
> {
> String newStockData;
> /* Unpack and handle the messages received */
> newStockData = message.getText();
> if(...)
> {
> /* Logic related to the data */
> }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (QPID-103) Implement support for MessageListener interface

Posted by "Marnie McCormack (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463343 ] 

Marnie McCormack commented on QPID-103:
---------------------------------------

I believe that this defect has been addressed as part of the drive for JMS Compliance. Tejeswar - are you working on this ? I'd recommend a look at the current trunk if so. If not, please unassign it ? Thanks.

> Implement support for MessageListener interface
> -----------------------------------------------
>
>                 Key: QPID-103
>                 URL: https://issues.apache.org/jira/browse/QPID-103
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Marnie McCormack
>         Assigned To: Tejeswar Das
>             Fix For: M2
>
>
> See AMQSession.get/setMessageListener methods which currently throw UnsupportedOperationException.
> See javadoc/JMS spec.
> The snippet below talks a little about the MessageListener interface (from JMS specification):
> 9.3.1 Receiving Messages Asynchronously
> In order to receive message asynchronously as they are delivered to the message consumer, the client program needs to create a message listener that implements the MessageListener interface. An implementation of the MessageListener interface, called StockListener.java, might look like this:
> import javax.jms.*;
> public class StockListener implements MessageListener
> {
> public void onMessage(Message message) {
> /* Unpack and handle the messages received */
> ...
> }
> }
> The client program registers the MessageListener object with the MessageConsumer object in the following way:
> StockListener myListener = new StockListener();
> /* Receiver is MessageConsumer object */
> receiver.setMessageListener(myListener);
> The Connection must be started for the message delivery to begin. The MessageListener is asynchronously notified whenever a message has been published to the Queue. This is done via the onMessage method in the MessageListener interface. It is up to the client to process the message there.
> JMS Example Code?April 12, 2002 105
> 9
> public void onMessage(Message message)
> {
> String newStockData;
> /* Unpack and handle the messages received */
> newStockData = message.getText();
> if(...)
> {
> /* Logic related to the data */
> }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira