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.
NodeLoginModule |
class NodeLoginModule : LoginModule Clients must connect to us with a username and password and must use TLS. If a someone connects with ArtemisMessagingComponent.NODE_USER then we confirm its just us as the node by checking their TLS certificate is the same as our one in our key store. Then theyre given full access to all valid queues. If they connect with ArtemisMessagingComponent.PEER_USER then we confirm they belong on our P2P network by checking their root CA is the same as our root CA. If thats the case the only access theyre given is the ablility send to our P2P address. In both cases the messages these authenticated nodes send to us are tagged with their subject DN and we assume the CN within that is their legal name. Otherwise if the username is neither of the above we assume its an RPC user and authenticate against our list of valid RPC users. RPC clients are given permission to perform RPC and nothing else. |
<init> |
ArtemisMessagingServer(config: NodeConfiguration, myHostPort: <ERROR CLASS>, networkMapCache: NetworkMapCache, userService: RPCUserService) This class configures and manages an Apache Artemis message queue broker. |
config |
val config: NodeConfiguration The config object is used to pass in the passwords for the certificate KeyStore and TrustStore |
myHostPort |
val myHostPort: <ERROR CLASS> |
networkMapCache |
val networkMapCache: NetworkMapCache |
userService |
val userService: RPCUserService |
bridgeToNetworkMapService |
fun bridgeToNetworkMapService(networkMapService: NetworkMapAddress): Unit |
start |
fun start(): Unit The server will make sure the bridge exists on network map changes, see method destroyOrCreateBridge We assume network map will be updated accordingly when the client node register with the network map server. |
stop |
fun stop(): Unit |
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): <ERROR CLASS> |