corda / net.corda.node.services.messaging / ArtemisMessagingServer

ArtemisMessagingServer

@ThreadSafe class ArtemisMessagingServer : ArtemisMessagingComponent

This class configures and manages an Apache Artemis message queue broker.

Nodes communication is managed using an Artemis specific protocol, but it supports other protocols like AMQP/1.0 as well for interop.

The current implementation is skeletal and lacks features like security or firewall tunnelling (that is, you must be able to receive TCP connections in order to receive messages). It is good enough for local communication within a fully connected network, trusted network or on localhost.

Constructors

<init> ArtemisMessagingServer(config: NodeConfiguration, artemisHostPort: HostAndPort, rpcHostPort: HostAndPort?, networkMapCache: NetworkMapCache, userService: RPCUserService)

This class configures and manages an Apache Artemis message queue broker.

Properties

artemisHostPort val artemisHostPort: HostAndPort
config val config: NodeConfiguration

The config object is used to pass in the passwords for the certificate KeyStore and TrustStore

networkMapCache val networkMapCache: NetworkMapCache
networkMapConnectionFuture val networkMapConnectionFuture: SettableFuture<Unit>?

A ListenableFuture which completes when the server successfully connects to the network map node. If a non-recoverable error is encountered then the Future will complete with an exception.

rpcHostPort val rpcHostPort: HostAndPort?
userService val userService: RPCUserService

Functions

start fun start(): Unit

The server will make sure the bridge exists on network map changes, see method updateBridgesOnNetworkChange We assume network map will be updated accordingly when the client node register with the network map server.

stop fun stop(): Unit

Inherited Functions

checkStorePasswords fun checkStorePasswords(): Unit

Returns nothing if the keystore was opened OK or throws if not. Useful to check the password, as unfortunately Artemis tends to bury the exception when the password is wrong.

expectedOnDefaultFileSystem fun Path.expectedOnDefaultFileSystem(): Unit
tcpTransport fun tcpTransport(direction: ConnectionDirection, host: String, port: Int, enableSSL: Boolean = true): TransportConfiguration