com.r3corda.node.services.messaging / ArtemisMessagingComponent

ArtemisMessagingComponent

abstract class ArtemisMessagingComponent : SingletonSerializeAsToken

The base class for Artemis services that defines shared data structures and transport configuration

Parameters

certificatePath - A place where Artemis can stash its message journal and other files.

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


Types

ArtemisAddress interface ArtemisAddress
ConnectionDirection enum class ConnectionDirection
NetworkMapAddress data class NetworkMapAddress : SingleMessageRecipient, ArtemisAddress
NodeAddress data class NodeAddress : SingleMessageRecipient, ArtemisAddress

This is the class used to implement SingleMessageRecipient, for now. Note that in future this class may change or evolve and code that relies upon it being a simple host/port may not function correctly. For instance it may contain onion routing data.

Constructors

<init> ArtemisMessagingComponent(config: NodeSSLConfiguration)

The base class for Artemis services that defines shared data structures and transport configuration

Properties

config val config: NodeSSLConfiguration

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.

configureWithDevSSLCertificate fun configureWithDevSSLCertificate(): Unit

Strictly for dev only automatically construct a server certificate/private key signed from the CA certs in Node resources. Then provision KeyStores into certificates folder under node path.

parseKeyFromQueueName fun parseKeyFromQueueName(name: String): PublicKey
tcpTransport fun tcpTransport(direction: ConnectionDirection, host: String, port: Int): <ERROR CLASS>

Inherited Functions

toToken open fun toToken(context: SerializeAsTokenContext): SerializationToken

Companion Object Properties

CLIENTS_PREFIX const val CLIENTS_PREFIX: String
NETWORK_MAP_ADDRESS val NETWORK_MAP_ADDRESS: <ERROR CLASS>
PEERS_PREFIX const val PEERS_PREFIX: String
RPC_REQUESTS_QUEUE const val RPC_REQUESTS_QUEUE: String

Companion Object Functions

toHostAndPort fun toHostAndPort(target: MessageRecipients): <ERROR CLASS>

Assuming the passed in target address is actually an ArtemisAddress will extract the host and port of the node. This should only be used in unit tests and the internals of the messaging services to keep addressing opaque for the future. N.B. Marked as JvmStatic to allow use in the inherited classes.

toQueueName fun toQueueName(target: MessageRecipients): <ERROR CLASS>

Assuming the passed in target address is actually an ArtemisAddress will extract the queue name used. For now the queue name is the Base58 version of the nodes identity. This should only be used in the internals of the messaging services to keep addressing opaque for the future. N.B. Marked as JvmStatic to allow use in the inherited classes.

Inheritors

ArtemisMessagingServer class ArtemisMessagingServer : ArtemisMessagingComponent

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

CordaRPCClient class CordaRPCClient : Closeable, ArtemisMessagingComponent

An RPC client connects to the specified server and allows you to make calls to the server that perform various useful tasks. See the documentation for proxy or review the docsite to learn more about how this API works.

NodeMessagingClient class NodeMessagingClient : ArtemisMessagingComponent, MessagingServiceInternal

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. Its primarily concerned with peer-to-peer messaging.