Skip to main content
Skip table of contents

AMQP Publisher

This adapter allows you to publish messages in an AMQP topic.

Properties

Operation

Operation performed by the adapter

Possible values:

  • Publish: Publish messages in an AMQP topic

Parameters

Adapter

Adapter main class (do not change!)

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

storedConfig

Identifier of the configuration provided in the amqpconfig.xml file

Possible values: Any string with the identifier, for example, queueEmployeesConfig

This parameter is required if you are using the amqpconfig.xml file.

host

AMQP server host

Possible values: Server host, such as localhost

This parameter is required if you are not using the amqpconfig.xml file.

port

Dedicated AMQP port on the server

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

This parameter is required if you are not using the amqpconfig.xml file.

username

Name of the user who publishes the message

Possible values: Any string with the username, such as user

password

The user's password

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

queue

Queue to which the message is published

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

This parameter is required if you are not using the amqpconfig.xml file.

container

Container in which the queue is located

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

qos

Quality of service of the message

Possible values:

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

  • AT_LEAST_ONCE: The message is delivered at least once.

  • EXACTLY_ONCE: The message is delivered exactly once.

If the qos parameter is not specified, the default value is AT_MOST_ONCE.

useSsl

Enables SSL encryption

Possible values:

  • true

  • false (default)

useSasl

Enables SASL encryption

Possible values:

  • true

  • false (default)

mechanism

SASL mechanism of the remote endpoint

Possible values:

  • PLAIN: All data is exchanged in plain text (default).

  • ANONYMOUS: The service can be used without authentication.

  • CRAM-MDS: Prevents password transmission in plain text.

  • Digest-MDS: Additional parameters such as integrity assurance can be used.

durable

Defines the message as permanent

Possible values:

  • true (default)

  • false

priority

Priority level of the message

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

ttl

The length of time in milliseconds after which the message should be discarded

Possible values: Any integer that specifies the time span in milliseconds, e.g. 4500

Status values

1

The adapter operation was executed successfully

0

The operation was successful (no output is generated).

-1

An error occurred while the operation was running (no output is generated).

Configuration

A configuration file, which is loaded at server startup, can be used to provide the required information. The amqpconfig.xml configuration file must be provided under the 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 per 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: Binary, Boolean, Byte, Char, Decimal32, Decimal64, Decimal128, Double, Float, Long, Short, String, Symbol, Timestamp (according to the following pattern: yyyy-[m]m-[d]d hh:mm:ss), UByte, UInt, ULong, UShort, Uuid.

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.