Skip to content

Instantly share code, notes, and snippets.

@ndemengel
Last active April 26, 2020 10:42
Show Gist options
  • Save ndemengel/383f2c70f5f2b36c6f2488c0c8cbe314 to your computer and use it in GitHub Desktop.
Save ndemengel/383f2c70f5f2b36c6f2488c0c8cbe314 to your computer and use it in GitHub Desktop.
Commanq queue: scheduling a command execution
@Component
class ClientCode(
@Named(MY_QUEUE_NAME)
private val commandScheduler: CommandScheduler
) {
fun doSomething() {
// ... some code ...
val transactionId: TransactionId = ...
val invoiceId: InvoiceId = ...
commandScheduler.schedule(PushTransactionForInvoiceSpec(transactionId, invoiceId))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment