What is the difference between a MessageListener and a Consumer in JMS?

前端 未结 3 947
盖世英雄少女心
盖世英雄少女心 2021-01-31 11:51

I am new to JMS. As far as I understood Consumers are capable of picking messages from queue/topic. So why do you need a MessageList

3条回答
  •  灰色年华
    2021-01-31 12:14

    from the docs:

    For synchronous receipt, a client can request the next message from a message consumer using one of its receive methods.

    For asynchronous delivery, a client can register a MessageListener object with a message consumer.

提交回复
热议问题