public class PublishMessageCommandImpl extends CommandWithPayload<PublishMessageCommandImpl> implements PublishMessageCommandStep1, PublishMessageCommandStep1.PublishMessageCommandStep2, PublishMessageCommandStep1.PublishMessageCommandStep3
PublishMessageCommandStep1.PublishMessageCommandStep2, PublishMessageCommandStep1.PublishMessageCommandStep3
objectMapper
Constructor and Description |
---|
PublishMessageCommandImpl(GatewayGrpc.GatewayStub asyncStub,
ZeebeClientConfiguration configuration,
ZeebeObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
PublishMessageCommandStep1.PublishMessageCommandStep3 |
correlationKey(String correlationKey)
Set the correlation-key of the message.
|
PublishMessageCommandStep1.PublishMessageCommandStep3 |
messageId(String messageId)
Set the id of the message.
|
PublishMessageCommandStep1.PublishMessageCommandStep2 |
messageName(String messageName)
Set the name of the message.
|
ZeebeFuture<Void> |
send()
Sends the command to the Zeebe broker.
|
protected PublishMessageCommandImpl |
setPayloadInternal(String payload) |
PublishMessageCommandStep1.PublishMessageCommandStep3 |
timeToLive(java.time.Duration timeToLive)
Set the time-to-live of the message.
|
payload, payload, payload, payload
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
payload, payload, payload, payload
public PublishMessageCommandImpl(GatewayGrpc.GatewayStub asyncStub, ZeebeClientConfiguration configuration, ZeebeObjectMapper objectMapper)
protected PublishMessageCommandImpl setPayloadInternal(String payload)
setPayloadInternal
in class CommandWithPayload<PublishMessageCommandImpl>
public PublishMessageCommandStep1.PublishMessageCommandStep3 messageId(String messageId)
PublishMessageCommandStep1.PublishMessageCommandStep3
messageId
in interface PublishMessageCommandStep1.PublishMessageCommandStep3
messageId
- the id of the messageFinalCommandStep.send()
to complete the command and send
it to the broker.public PublishMessageCommandStep1.PublishMessageCommandStep3 timeToLive(java.time.Duration timeToLive)
PublishMessageCommandStep1.PublishMessageCommandStep3
If the duration is zero or negative then the message can only be correlated to open subscriptions (e.g. to an entered message catch event).
If no duration is set then the default is used from the configuration.
timeToLive
in interface PublishMessageCommandStep1.PublishMessageCommandStep3
timeToLive
- the time-to-live of the messageFinalCommandStep.send()
to complete the command and send
it to the broker.public PublishMessageCommandStep1.PublishMessageCommandStep3 correlationKey(String correlationKey)
PublishMessageCommandStep1.PublishMessageCommandStep2
correlationKey
in interface PublishMessageCommandStep1.PublishMessageCommandStep2
correlationKey
- the correlation-key of the messagepublic PublishMessageCommandStep1.PublishMessageCommandStep2 messageName(String messageName)
PublishMessageCommandStep1
messageName
in interface PublishMessageCommandStep1
messageName
- the name of the messagepublic ZeebeFuture<Void> send()
FinalCommandStep
Call ZeebeFuture.join()
to wait until the response is available.
Future<JobEvent> future = command.send(); JobEvent event = future.join();
send
in interface FinalCommandStep<Void>
Copyright © 2017–2018 camunda services GmbH. All rights reserved.