Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply event sourcing to message publish processor #6376

Merged
merged 1 commit into from Feb 23, 2021

Conversation

saig0
Copy link
Member

@saig0 saig0 commented Feb 18, 2021

Description

  • use the state writer in the message publish processor to apply the state changes
    • rename the processor to match the common pattern (record + intent + "Processor")
    • use only the immutable states
    • keep using the EventHandle to share the common behavior to trigger start events
  • new properties in records to apply the state changes from the events:
    • message: deadline
    • message subscription: variables
    • message start event subscription: workflowInstanceKey, messageKey, correlationKey, variables
  • new intents to persist a pending message correlation:
    • message subscription: CORRELATING
    • message start event subscription: CORRELATED
  • extend the ES templates for the new record properties
    • there is no template for message start event subscription yet
  • disable the replay filter to restore the key generator for migrated processors

Hints for the reviewer:

  • no further improvements of the message processor to keep the changes minimal
  • solve the open TODO "reuse the message record in the state" in a follow-up PR

Related issues

The last part of #6178.

closes #6178

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/0.25) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement

@saig0 saig0 requested a review from Zelldon February 18, 2021 10:21
@saig0 saig0 marked this pull request as ready for review February 18, 2021 10:21
Copy link
Member

@Zelldon Zelldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @saig0 I added some questions which would be cool if we discuss them before. Tbh it was a bit confusing for me that we introduced the CORRELATING for message subscritptions and have the CORRELATED for message start subscriptions 😅 and yes I have read the ZEP, but it doesn't make it more clearer.

protocol/pom.xml Show resolved Hide resolved
messageState.put(message);

// avoid correlating this message to the workflow again
correlatingSubscriptions.visitBpmnProcessIds(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this done now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we write for all of them the follow up events?

Copy link
Member Author

@saig0 saig0 requested a review from Zelldon February 22, 2021 14:39
@saig0
Copy link
Member Author

saig0 commented Feb 23, 2021

🛎️ @Zelldon do you have more questions?

Copy link
Member

@Zelldon Zelldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 👍

* use the state writer in the message publish processor to apply the state changes
* extend the ES templates for the new record properties
* disable the replay filter to restore the key generator for migrated processors
@saig0
Copy link
Member Author

saig0 commented Feb 23, 2021

bors r+

@zeebe-bors
Copy link
Contributor

zeebe-bors bot commented Feb 23, 2021

Build succeeded:

@zeebe-bors zeebe-bors bot merged commit b503c31 into develop Feb 23, 2021
@zeebe-bors zeebe-bors bot deleted the 6178-message-publish branch February 23, 2021 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply event-sourcing to the message processors
3 participants