corda / net.corda.node.services.messaging / ArtemisMessagingComponent

ArtemisMessagingComponent

abstract class ArtemisMessagingComponent : SingletonSerializeAsToken

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

Types

ArtemisAddress interface ArtemisAddress : MessageRecipients
ArtemisPeerAddress interface ArtemisPeerAddress : ArtemisAddress, SingleMessageRecipient
ConnectionDirection sealed class ConnectionDirection
NetworkMapAddress data class NetworkMapAddress : SingleMessageRecipient, ArtemisPeerAddress
NodeAddress data class NodeAddress : ArtemisPeerAddress

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.

ServiceAddress data class ServiceAddress : ArtemisAddress, MessageRecipientGroup

ServiceAddress implements MessageRecipientGroup. It holds a queue associated with a service advertised by zero or more nodes. Each advertising node has an associated consumer.

Constructors

<init> ArtemisMessagingComponent()

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

Properties

config abstract val config: SSLConfiguration?

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

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

Inherited Functions

toToken open fun toToken(context: SerializeAsTokenContext): SerializationToken

Companion Object Properties

CLIENTS_PREFIX const val CLIENTS_PREFIX: String
INTERNAL_PREFIX const val INTERNAL_PREFIX: String
NETWORK_MAP_QUEUE const val NETWORK_MAP_QUEUE: String
NODE_USER const val NODE_USER: String
NOTIFICATIONS_ADDRESS const val NOTIFICATIONS_ADDRESS: String
P2P_QUEUE const val P2P_QUEUE: String
PEERS_PREFIX const val PEERS_PREFIX: String
PEER_USER const val PEER_USER: String
RPC_QUEUE_REMOVALS_QUEUE const val RPC_QUEUE_REMOVALS_QUEUE: String
RPC_REQUESTS_QUEUE const val RPC_REQUESTS_QUEUE: String
SERVICES_PREFIX const val SERVICES_PREFIX: String
VERIFY_PEER_COMMON_NAME const val VERIFY_PEER_COMMON_NAME: String

Companion Object Functions

toHostAndPort fun toHostAndPort(target: MessageRecipients): HostAndPort

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.

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. It's primarily concerned with peer-to-peer messaging.