SlideShare une entreprise Scribd logo
1  sur  14
MULE JMS-QUEUES
GSN-K
JMS
• JMS (Java Message Service) is a widely-used API for Message Oriented
Middleware. It allows communication between different components of a
distributed application to be loosely coupled, reliable, and asynchronous.
• JMS supports two models for messaging:
• Queues - Point-to-point
• Topics - Publish and subscribe
• Mule's JMS transport lets you easily send and receive messages to
queues and topics for any message service which implements the JMS
specification.
Queues
• In the point-to-point or queuing model, a sender posts messages to a
particular queue and a receiver reads messages from the queue. Here,
the sender knows the destination of the message and posts the message
directly to the receiver's queue. It is characterized by the following:
• Only one consumer gets the message
• The producer does not have to be running at the time the
consumer consumes the message, nor does the consumer
need to be running at the time the message is sent
• Every message successfully processed is acknowledged by the
consumer
Configuration with Example:
• Anypoint Studio offers easy-to-use components to connect to JMS
Queues and Topics. In the below example, we will use ActiveMQ, a
leading open source JMS implementation from Apache that supports
JMS.
• The outline of the simple steps required to implement this example is
as follows:
• Import ActiveMQ libraries
• Create an ActiveMQ connector
• Enqueue to JMS Queue
• Run the sample
1. Import ActiveMQ Library:
• Download Apache ActiveMQ binaries (ActiveMQ 5.11) from
http://activemq.apache.org/download.html. Unzip the compressed
file to any folder on your file system. Let’s call it
<ACTIVEMQ_HOME>.
• Create a new flow in Mule Studio and name it “jms”. To configure
the project to use ActiveMQ libraries, right-click on the project ->
Properties -> Java Build Path -> Add External JARs. Select
“activemq-all-5.11-SNAPSHOT.jar” from <ACTIVEMQ_HOME>.
2. Create an ActiveMQ Connector:
• Double-click on “jms” flow to bring up the message flow. Click on the
“Global Elements” tab. Click on “Create” and locate ActiveMQ under
“Connectors -> JMS” and click OK.
3. Enqueue to JMS Queue:
• We will use the request payload received from an HTTP inbound
endpoint to seed the ActiveMQ Queue. Open the “jms” message
flow and drag and drop an HTTP endpoint on to the flow.
• Double-click on the HTTP endpoint to bring up the properties
dialog. Specify “jms_queue” for Path. This will make the HTTP
endpoint accessible using URL http://localhost:7777/jms_queue.
• Set a payload that you want to add to the queue.
• Drag and drop a JMS endpoint next to the HTTP inbound endpoint.
• Double-click the JMS endpoint to bring up the properties dialog.
Specify “queue” for Queue name.
Select “Active_MQ” for Connection Reference in the Connector
Configuration that we created in Step 2.
4. Create a Jms_receiver :
• Use a Jms endpoint to receive the messages in the queue. Its
configuration is as follows:
• Use a Logger to log the Received Message.
• Use Set-payload to send a response back to the Jms Service.
• The final JMS Receiver Message Flow is as below:
5. Run the sample:
• First, run ActiveMQ using executable “activemq-admin” from
<ACTIVEMQ_HOME>/bin folder. Make sure you can access the ActiveMQ
admin page using http://localhost:8161/.
• Run the JMS flow.
• Open http://localhost:7777/jms_queue.This will enqueue the request to
the ActiveMQ JMS Queue “queue”.
• Verify this by examining the ActiveMQ administration page at
http://localhost:8161/admin/queues.jsp. We can see the messages
under the “Messages Enqueued” column.
• The Output you receive after the execution is the Payload Set by the
JMS-Client.
• Note: Only one client can read from a queue at one time and the
messages read from the queue are removed from the queue. If you want
to perform any transactions on top of JMS then the Transaction settings
come in handy.
•Thank You All

Contenu connexe

Tendances

Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSreekanth Kondapalli
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored proceduremdfkhan625
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esbRaviShankar Mishra
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in MuleKhasim Saheb
 
Mule high availability (ha) cluster
Mule high availability (ha) clusterMule high availability (ha) cluster
Mule high availability (ha) clusterAchyuta Lakshmi
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in muleMohammed246
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esbKhasim Cise
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor componentSindhu VL
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in muleSindhu VL
 

Tendances (16)

Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in Mule
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
 
Mule high availability (ha) cluster
Mule high availability (ha) clusterMule high availability (ha) cluster
Mule high availability (ha) cluster
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule esb
Mule esbMule esb
Mule esb
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Mule esb mule message
Mule esb   mule messageMule esb   mule message
Mule esb mule message
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esb
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor component
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in mule
 
Mule esb
Mule esbMule esb
Mule esb
 
Scatter gather in mule
Scatter gather in muleScatter gather in mule
Scatter gather in mule
 

Similaire à Mule jms queues

Similaire à Mule jms queues (20)

M messaging 2
M messaging 2M messaging 2
M messaging 2
 
Jms queue
Jms queueJms queue
Jms queue
 
Jms queues
Jms queuesJms queues
Jms queues
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
 
Jms topics
Jms topicsJms topics
Jms topics
 
Jms topics
Jms   topicsJms   topics
Jms topics
 
Active mq read and write flow in mule
Active mq  read and write flow in muleActive mq  read and write flow in mule
Active mq read and write flow in mule
 
Apache ActiveMQ
Apache ActiveMQ Apache ActiveMQ
Apache ActiveMQ
 
Jms using j boss
Jms using j bossJms using j boss
Jms using j boss
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQ
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
Introduction java messaging services
Introduction java messaging servicesIntroduction java messaging services
Introduction java messaging services
 

Plus de Gandham38

Mule routing and filters
Mule routing and filtersMule routing and filters
Mule routing and filtersGandham38
 
Mule splitters
Mule splittersMule splitters
Mule splittersGandham38
 
Mule system properties
Mule system propertiesMule system properties
Mule system propertiesGandham38
 
Mule properties
Mule propertiesMule properties
Mule propertiesGandham38
 
Mule enricher component
Mule enricher component Mule enricher component
Mule enricher component Gandham38
 

Plus de Gandham38 (7)

Java mule
Java muleJava mule
Java mule
 
Mule routing and filters
Mule routing and filtersMule routing and filters
Mule routing and filters
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Mule system properties
Mule system propertiesMule system properties
Mule system properties
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Mule batch
Mule batchMule batch
Mule batch
 
Mule enricher component
Mule enricher component Mule enricher component
Mule enricher component
 

Dernier

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 

Dernier (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 

Mule jms queues

  • 2. JMS • JMS (Java Message Service) is a widely-used API for Message Oriented Middleware. It allows communication between different components of a distributed application to be loosely coupled, reliable, and asynchronous. • JMS supports two models for messaging: • Queues - Point-to-point • Topics - Publish and subscribe • Mule's JMS transport lets you easily send and receive messages to queues and topics for any message service which implements the JMS specification.
  • 3. Queues • In the point-to-point or queuing model, a sender posts messages to a particular queue and a receiver reads messages from the queue. Here, the sender knows the destination of the message and posts the message directly to the receiver's queue. It is characterized by the following: • Only one consumer gets the message • The producer does not have to be running at the time the consumer consumes the message, nor does the consumer need to be running at the time the message is sent • Every message successfully processed is acknowledged by the consumer
  • 4. Configuration with Example: • Anypoint Studio offers easy-to-use components to connect to JMS Queues and Topics. In the below example, we will use ActiveMQ, a leading open source JMS implementation from Apache that supports JMS. • The outline of the simple steps required to implement this example is as follows: • Import ActiveMQ libraries • Create an ActiveMQ connector • Enqueue to JMS Queue • Run the sample
  • 5. 1. Import ActiveMQ Library: • Download Apache ActiveMQ binaries (ActiveMQ 5.11) from http://activemq.apache.org/download.html. Unzip the compressed file to any folder on your file system. Let’s call it <ACTIVEMQ_HOME>. • Create a new flow in Mule Studio and name it “jms”. To configure the project to use ActiveMQ libraries, right-click on the project -> Properties -> Java Build Path -> Add External JARs. Select “activemq-all-5.11-SNAPSHOT.jar” from <ACTIVEMQ_HOME>.
  • 6.
  • 7. 2. Create an ActiveMQ Connector: • Double-click on “jms” flow to bring up the message flow. Click on the “Global Elements” tab. Click on “Create” and locate ActiveMQ under “Connectors -> JMS” and click OK.
  • 8. 3. Enqueue to JMS Queue: • We will use the request payload received from an HTTP inbound endpoint to seed the ActiveMQ Queue. Open the “jms” message flow and drag and drop an HTTP endpoint on to the flow. • Double-click on the HTTP endpoint to bring up the properties dialog. Specify “jms_queue” for Path. This will make the HTTP endpoint accessible using URL http://localhost:7777/jms_queue. • Set a payload that you want to add to the queue. • Drag and drop a JMS endpoint next to the HTTP inbound endpoint. • Double-click the JMS endpoint to bring up the properties dialog. Specify “queue” for Queue name.
  • 9. Select “Active_MQ” for Connection Reference in the Connector Configuration that we created in Step 2.
  • 10. 4. Create a Jms_receiver : • Use a Jms endpoint to receive the messages in the queue. Its configuration is as follows:
  • 11. • Use a Logger to log the Received Message. • Use Set-payload to send a response back to the Jms Service. • The final JMS Receiver Message Flow is as below: 5. Run the sample: • First, run ActiveMQ using executable “activemq-admin” from <ACTIVEMQ_HOME>/bin folder. Make sure you can access the ActiveMQ admin page using http://localhost:8161/.
  • 12. • Run the JMS flow. • Open http://localhost:7777/jms_queue.This will enqueue the request to the ActiveMQ JMS Queue “queue”. • Verify this by examining the ActiveMQ administration page at http://localhost:8161/admin/queues.jsp. We can see the messages under the “Messages Enqueued” column.
  • 13. • The Output you receive after the execution is the Payload Set by the JMS-Client. • Note: Only one client can read from a queue at one time and the messages read from the queue are removed from the queue. If you want to perform any transactions on top of JMS then the Transaction settings come in handy.