com.r3corda.node.services.messaging / ArtemisMessagingClient / <init>

# <init>

`ArtemisMessagingClient(directory: Path, config: NodeConfiguration, serverHostPort: <ERROR CLASS>, myIdentity: PublicKey?, executor: AffinityExecutor, persistentInbox: Boolean = true)`

This class implements the MessagingService API using Apache Artemis, the successor to their ActiveMQ product. Artemis is a message queue broker and here we run a client connecting to the specified broker instance ArtemisMessagingServer.

Message handlers are run on the provided AffinityExecutor synchronously, that is, the Artemis callback threads are blocked until the handler is scheduled and completed. This allows backpressure to propagate from the given executor through into Artemis and from there, back through to senders.

### Parameters

`serverHostPort` - The address of the broker instance to connect to (might be running in the same process)
`myIdentity` - Either the public key to be used as the ArtemisMQ address and queue name for the node globally, or null to indicate that this is a NetworkMapService node which will be bound globally to the name "networkmap"
`executor` - An executor to run received message tasks upon.
`persistentInbox` - If true the inbox will be created persistent if not already created. If false the inbox queue will be transient, which is appropriate for UI clients for example.