Skip to main content
Skip table of contents

AMQP Publisher

This adapter publishes messages to an AMQP topic.

Properties

Operation

Defines the operation executed by the adapter

Possible values:

  • Publish: Publish messages provided as input into an AMQP topic

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter.amqp.AmqpPublisherAdapter: Main class (default)

storedConfig

Identifier of the configuration provided in amqpconfig.xml

Possible values: Any string containing the configuration identifier, e.g. queueEmployeesConfig

This parameter is mandatory if you use the amqpconfig.xml file.

host

AMQP server host

Possible values: Server host, e.g. localhost

This parameter is mandatory if you do not use the amqpconfig.xml file.

port

Dedicated AMQP port in the server

Possible values: AMQP port number, e.g. 5672

This parameter is mandatory if you do not use the amqpconfig.xml file.

username

Name of the user publishing the messages

Possible values: Any string containing the user name, e.g. user

password

Password associated to the user

Possible values: Any string containing the corresponding password, e.g. p4ssw0rd

queue

Queue where the message will be published

Possible values: Any string containing the queue name, e.g. employees

This parameter is mandatory if you do not use the amqpconfig.xml file.

container

Container where the queue is placed

Possible values: Any string containing the container name, e.g. employeesContainer

qos

Quality of Service of the message

Possible values:

  • AT_MOST_ONCE: The message is delivered at most once, or it is not delivered at all.

  • AT_LEAST_ONCE: The message is delivered at least once.

  • EXACTLY_ONCE: The message is delivered only once.

The default value is AT_MOST_ONCE, if the qos parameter is not specified.

useSsl

Enable SSL encryption

Possible values:

  • true 

  • false (default)

useSasl

Activate SASL Authentication 

Possible values: 

  • true 

  • false (default)

mechanism

SASL mechanism of the remote endpoint. 

Mögliche Werte:

  • PLAIN: All data is exchanged in cleartext  (Default).

  • ANONYMOUS: The service can be used for unauthenticated guest access.

  • CRAM-MDS:  Prevents sending the password in cleartext.

  • Digest-MDS:  Additional parameters can be used for integrity checks.  

durable

Set the message as durable

Possible values: 

  • true (default)

  • false

priority

Priority level of the message 

Possible values: Any number between 0 and 255, e.g. 3

ttl

Period of time in milliseconds when the message is considered alive

Possible values: Any integer indicating the period of time in milliseconds, e.g. 4500

Status values

1

The operation was executed successfully.

0

The operation was executed successfully (no output is generated).

-1

An error occurred during the operation's execution (no output is generated).

Configuration

To provide the needed information, a configuration file with a specified structure can be used, which is loaded at server startup. The configuration file amqpconfig.xml must be stored under the server path X4DB/0.

The file has the following structure:

XML
<?xml version='1.0' encoding='UTF-8'?>
<RootElement>
	<AMQPConfig name="queueEmployeesConfig">
		<Server host="localhost" port="5672" useSsl="false"/>
		<Client user="user" password="p4ssw0rd"/>
		<Queue container="employeesContainer" name="employees" qos="AT_LEAST_ONCE"/>
	</AMQPConfig>
</RootElement>

Input

The AMQP Publisher expects the following input structure, whereby only one element for each message is allowed: 

Simple types:

XML
<Messages>
	<Message>
		<Element type="String" value="Good morning!!"/>
	</Message>
	<Message>
		<Element type="Int" value="18"/>
	</Message>
</Messages>

The following simple types are allowed: BinaryBooleanByteCharDecimal32Decimal64Decimal128DoubleFloatLongShortStringSymbolTimestamp (following the pattern yyyy-[m]m-[d]d hh:mm:ss), UByteUIntULongUShortUuid.

Complex types:

  • List:

    XML
    <Messages>
    	<Message>
    		<Element type="List">
    			<Element type="Int" value="1"/>
    			<Element type="Short" value="3"/>
    			<Element type="Boolean" value="false"/>
    		</Element>
    	</Message>
    </Messages>

  • Map:

    XML
    <Messages>
        <Message>
            <Element type="Map">
                <Entries>
                    <Entry>
                        <Key type="Int" value="2"/>
                        <Value type="String" value="Hello!!"/>
                    </Entry>
    				<Entry>
                        <Key type="Int" value="5"/>
                        <Value type="String" value="Goodbye!!"/>
                    </Entry>
                </Entries>
            </Element>
        </Message>
    </Messages>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.