here’s a brief explanation for each field. Please do provide the NPE tracktrace if you still have it. We shouldn’t be throwing those randomly around.
message Command {
/* The identifier, uniquely identifying this message /
string message_identifier = 1;
/ The name of the command. In Axon, this defaults to the fully qualified class name, but may be overridden /
string name = 2;
/ Time at which the command was dispatched to AxonServer. /
int64 timestamp = 3;
/ The serialized representation of the command. /
SerializedObject payload = 4;
/ Any application specific meta data elements contained in the command message*/
map<string, MetaDataValue> meta_data = 5;
/* Processing instructions provide information to AxonServer on how to dispatch the message /
/ Set ROUTING_KEY to the aggregate identifier (or other routing key, if not default) the command targets for consistent routing*/
repeated ProcessingInstruction processing_instructions = 6;
/* Uniquely identifies the instance of the dispatching component. Used for monitoring and routing statistics. /
string client_id = 7;
/ The name of the component. Used for monitoring and routing statistics. */
string component_name = 8;
}
You can check the CommandSerializer class in the axon-server-connector module of AxonFramework for details on how Axon messages are transformed into gRPC/protobuf messages.
Note that you can also use the HTTP endpoints to dispatch commands. It doesn’t perform as well as the gRPC one, but may be easier to implement.
Check Swagger for details (assuming AxonServer runs on localhost, visit: http://localhost:8024/swagger-ui.html#/command-rest-controller)