3.2. Basic configuration


Overview

The basic requirements for configuring a sender endpoint are straightforward. You need to supply the following information:
  • the endpoint's name
  • the endpoint's service name
  • the file or directory to which files are written
All of this information is provided using attributes of the sender element.

Identifying the endpoint

All endpoints in the ESB need to have a unique identity. An endpoint's identity is made up of two pieces:
  • a service name
  • an endpoint name
Table 3.1, “Attributes for identifying a sender endpoint” describes the attributes used to identify a sender endpoint.
Table 3.1. Attributes for identifying a sender endpoint
NameDescription
service Specifies the service name of the endpoint. This value must be a valid QName and does not need to be unique across the ESB.
endpoint Specifies the name of the endpoint. This value is a simple string. It must be unique among all of the endpoints associated with a given service name.

Specifying the file destination

You specify the location the sender endpoint writes files using the sender element's directory attribute. This attribute takes a URI that identifies a location on the file system.
Important
Relative URIs are resolved from the directory in which the Red Hat JBoss Fuse container was started.
Using the default marshaler, the name of the file is determined by the org.apache.servicemix.file.name property. This property is set on either the message exchange or the message by the endpoint originating the message exchange.
Important
The marshaler is responsible for determining the name of the file being written. For more information on marshalers see Chapter 4, File Marshalers.

Example

Example 3.1, “Simple sender endpoint” shows the configuration for a simple sender endpoint.

Example 3.1. Simple sender endpoint

<beans xmlns:file="http://servicemix.apache.org/file/1.0"
	       xmlns:foo="http://servicemix.org/demo/">

  <file:sender service="foo:fileSender"
               endpoint="sender"
               directory="outbox" />
  ...
</beans>
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.