About __Java Message Service__: [Wikipedia: Jakarta Messaging API Link|https://en.wikipedia.org/wiki/Jakarta_Messaging]\\
__Supported protocol__: AMQPS ([Wikipedia: Advanced Message Queuing Protocol Link|https://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol])\\
\\
Dependency jar files must be downloaded (unzip) and placed in your __CrushFTP Install Folder/plugins/ lib__. Restart is required to load the new JMS-related dependency jars. [ Download Link|jms_dependency.zip]\\  
\\
!!1. Solace JMS AMQPS Integration\\
\\
More info about Solace JMS AMQP: [Why Solace Support for AMQP 1.0? Link|https://docs.solace.com/API/AMQP/Why-AMQP.htm]\\
\\
Get the __AMQPS URL__, __Username__, and __Password__ for JMSTask's __JNDI configuration__ from the __Solace Broker Management__.\\
\\
[JMS (Java Message Service)/jms_amqp.png]\\
\\
!!2. JMSTask configuration:\\

!2.1 JNDI config: Variable replacement is supported.\\
More info about __Java Naming and Directory Interface__: [Wikipedia: Java Naming and Directory Interface Link|https://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interface]\\
__JNDI__ is a system used by some applications to store and access connection details—like the server address, username, and password—as well as the names of messaging channels (called __topics__ and __queues__).In simple terms, it helps the application know where to connect and where to send or receive messages, without needing to hard-code those details every time.\\
\\
[JMS (Java Message Service)/jms_jndi_config.png]\\
\\
Configuration example:\\
{{{
# Context Factory
java.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory

# Secured AMQP Host 
connectionfactory.qpidConnectionfactory=amqps://mr-connection-XXXXd:56XX

#User name and password
username=solace-XXXX
password=rsaXXXXXX
#Topic name
topic.my_topic_name=my_topic_name
queue.my_queue=my_queue
}}}\\
\\
__java.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory:__ This tells the application which type of messaging system it is connecting to.\\
__connectionfactory.qpidConnectionfactory=amqps://mr-connection-XXXXd:56XX__: This is the secure address of the messaging server (uses AMQPS, which is encrypted). It tells the application where to connect to send and receive messages.\\
__username=solace-XXXX password=rsaXXXXXX__: These are the login credentials used to access the messaging server.\\
__topic.my_topic_name=my_topic_name__: A topic is a named channel where messages are published. Applications can subscribe to this topic to receive relevant messages.\\
__queue.my_queue=my_queue__: A queue is another type of message destination. Unlike topics, queues hold messages until they are delivered to a specific recipient.\\
\\
!2.2 Producer Mode:\\
\\
Producer mode means the system is acting as a sender, creating and sending messages to a messaging server. It does not receive or process incoming messages—its role is only to send out information, such as updates or alerts, to other systems or services.\\
\\
[JMS (Java Message Service)/JMSTask.png]\\
\\
__1. Destination Name__: It refers to the Topic or Queue that has been set up in the __JNDI configuration__. You can also use [CrushTaskVariables] to automatically insert values into the name, allowing for flexible and dynamic message routing.\\
\\
__2. Advanced Options__:\\
\\
__ Persistent:__ If enabled, messages will not be lost even if the messaging server goes down and restarts. They are stored safely until delivered.\\
__ Time to live:__ Sets how long a message remains valid. After this time passes, the message will automatically expire if not delivered.\\
__ Priority:__ Determines the importance of the message. Values range from 0 to 9 — 0 to 4 are normal priority, while 5 to 9 are treated as high priority.\\
\\
__3. Message Type: Custom Message__: Send a custom message to the destination as text or binary. Variable replacement is also supported. You can loop through incoming files and send as many custom messages with file-related pieces of information like name, path, or URL.\\
\\
__4. Message Type: Send files__: It sends the file content in binary mode. Max file size allowed: __10 MB__.\\
\\
!2.3 Consumer Mode:\\
\\
Receive messages from the given destination topic or queue.\\
\\
[JMS (Java Message Service)/jms_consumer_mode.png]\\
__1. Destination name__: Name of the __Topic__ or __Queue__ configured on __JNDI config__. Variable replacement is supported ([CrushTaskVariables]).\\
\\
__2. Message settings__: Limit the number of messages, and control the read timeout of message reading.\\
\\
__3. Store settings__: It saves the message (less than 10MB) as a file to the given location. Provide the file name and make it unique to avoid overwriting. Variable replacement is supported.\\
Message-related variables:\\
{{{
{message_id}, {message_priority}, {message_expiration}, {message_type}, {message_correlation_id}, {message_reply_to} 
}}}
\\