Outbound endpoint syntax

Outbound endpoint definition purpose, syntax, description, and example.

Purpose

You define an outbound endpoint that represents the destination for HTTP or Java™ Message Service (JMS) messages. When you define the endpoint, you must ensure that it references an outbound binding, and either a URL, or a JMS connection factory and destination.

You can specify advanced properties to control the behavior of outbound endpoints.

Syntax

An outbound HTTP endpoint:

define outbound HTTP endpoint '<endpoint name>' 
	with 
		description "<description>",
	using 
		binding '<binding name>', 
		url "<url>". | ,
	discarding messages:
		if not delivered within <time period>
	advanced properties:
		- '<name>': "<value>"
		- '<name>': "<value>".

An outbound JMS endpoint:

define outbound JMS endpoint '<endpoint name>' 
	with 
		description "<description>",
	using 
		binding '<binding name>', 
		connection factory "<connection factory>",
		destination "<destination>". | ,
	discarding messages:
		if not delivered within <time period>
	advanced properties:
		- '<name>': "<value>"
		- '<name>': "<value>".

Syntax diagrams

Use the following syntax diagrams to better understand the relationships between the different options and the different values of an option.

Outbound HTTP endpoint syntax diagramOutbound JMS endpoint syntax diagramAdvanced properties syntax diagramOutbound discard policy.

Description

Table 1. Mandatory parameters for an outbound HTTP endpoint
Parameter Description
endpoint name The name of the endpoint.
binding name The name of the binding for which this endpoint sends events.
url The URL to where events are sent.
Table 2. Optional parameters for an outbound HTTP endpoint
Parameter Description
description The description of the endpoint.
discarding messages The clause that defines when outbound events are discarded. By default, outbound events from an agent transaction are stored indefinitely until they are delivered.

The time period is expressed in the following units: second, seconds, minute, minutes, hour, or hours.

Table 3. Advanced properties for outbound HTTP endpoints
Property Default value Description
http.connection.timeout 10000 The HTTP connection wait timeout period, in milliseconds. This is the elapsed time after which an attempted connection to the external HTTP server is abandoned. A value 0 indicates an infinite period.
http.socket.timeout 10000 The HTTP socket wait timeout period, in milliseconds. A value 0 indicates an infinite period.
http.ssl.config If you do not set this property, the default SSL configuration is used. The name of the SSL configuration used for outbound HTTPS connections.
Table 4. Mandatory parameters for an outbound JMS endpoint
Parameter Description
endpoint name The name of the endpoint.
binding name The name of the binding for which this endpoint receives events.
connection factory The Java Naming Directory Interface (JNDI) name of the JMS connection factory to be used for sending events. The connection factory must be defined in the server.xml configuration file of the Liberty server, or the servers on which the endpoint runs.
destination The JNDI name of the JMS destination to which events are sent. The destination must be defined in the server.xml configuration file of the Liberty server, or the servers on which the endpoint runs.
Table 5. Optional parameters for an outbound JMS endpoint
Parameter Description
description The description of the endpoint.
discarding messages The clause that defines when outbound events are discarded. By default, outbound events from an agent transaction are stored indefinitely until they are delivered.

The time period is expressed in the following units: second, seconds, minute, minutes, hour, or hours.

Table 6. Advanced properties for outbound JMS endpoints
Property Default Description
jms.bytes.message false If you set this property to true, a JMS BytesMessage is used to carry the event message. Otherwise, a TextMessage is used.
jms.persistent.delivery true If you set this property to true, the DeliveryMode set on the JMS message producer is PERSISTENT. Otherwise, the DeliveryMode is NON_PERSISTENT.

Example

An outbound HTTP endpoint:
define outbound HTTP endpoint 'insuranceClaimsOutbound' 
	with 
		description "Outbound insurance claims endpoint",
	using 
		binding 'insuranceClaims', 
	url "http://claims.example.org/claims/outbound". 
An outbound JMS endpoint:
define outbound JMS endpoint 'insuranceClaimsOutbound' 
	with 
		description "Outbound insurance claims endpoint",
	using 
		binding 'insuranceClaims', 
		connection factory "jms/ClaimsConnectionFactory",
		destination "jms/ClaimsDestination". 

An outbound JMS endpoint with custom properties:

define outbound JMS endpoint 'insuranceClaimsOutbound' 
	with 
		description "Outbound insurance claims endpoint",
	using 
		binding 'insuranceClaims', 
		connection factory "jms/ClaimsConnectionFactory",
		destination "jms/ClaimsDestination", 
	discarding messages:
		if not delivered within 30 minutes
	advanced properties : 
		- 'MsgProps.Custom1': "byte".