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

Feature/1084 provide data entry sender type tx as configurable option #1086

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

margue
Copy link

@margue margue commented Feb 13, 2025

Basic implementation of TX-style DatapoolSender.

Details to be discussed:

  • DataEntrySender interface and use of generics needs to be checked (Taskpool uses EngineTaskCommand, Datapool uses Axon CommandMessages incl. MetaData)
  • Naming of DataEntryCommandProcessor and DataEntryCommandSender (this is the interface used by client applications, therefore potential incompatibility issue -> left unchanged in this PR)
  • CommandListGateway should be extracted to separate module, so that it can be used by datapool sender and taskpool sender (so far I copied it over to datapool sender)
  • Separate SenderProperties and TaskpoolSenderProperties from each other, so that global sender properties can be used for taskpool AND datapool (or even might be used only by new CommandListGateway module)
  • Sender-1** -> Changed log message codes to the same codes as in taskpool adding 100, so that it is clear, that all logmessages with code > 100 derive from datapool while keeping the same log message number semantics like in taskpool
  • Documentation not updated so far O:-)

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link
Member

@zambrovski zambrovski left a comment

Choose a reason for hiding this comment

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

I'll have to look on this in the IDE, not in the browser. I believe it is generally ok, but the naming of the components and extractions you proposed in the comments are worth to discuss and probably introduce some changes.

fun configureSender(
gateway: CommandGateway,
fun dataEntryCommandProcessor(
dataEntrySender: DataEntrySender,
Copy link
Member

Choose a reason for hiding this comment

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

I believe this at least very confusing. This bean factory creates a DataEntryCommandSender and requires a DataEntrySender. Let us find better names for all this classes.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, exactly. I am not happy with the wording, as I mentioned in my PR-comments.

/**
* Interface for beans sending data entry commands.
*/
interface DataEntrySender {
Copy link
Member

Choose a reason for hiding this comment

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

Don't like this name. There already a DataEntryCommandSender class and this one is named to similar and provides JavaDoc saying that it indeed sends the data entry commands (so is named not according to its function).

Copy link
Author

Choose a reason for hiding this comment

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

Agreed!

class DirectTxAwareAccumulatingDataEntryCommandSender(
private val commandListGateway: CommandListGateway,
dataEntrySenderProperties: DataEntrySenderProperties
) : TxAwareAccumulatingDataEntryCommandSender(
Copy link
Member

Choose a reason for hiding this comment

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

Why have you introduced the separation? Are you planing to introduce the job-based sender too (would be a mirror of the job-based sender for tasks)?

Copy link
Author

Choose a reason for hiding this comment

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

Might be a valid next step, I thought of. And also keeping the structure consistent to Taskpool Sender.

@zambrovski
Copy link
Member

And please double check, why Codacy tells you that you introduced 6 new issues.

- adds missing docs to DataEntrySenderConfiguration
- declares simpleDataEntryCommandSender Bean as DataEntrySender
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.

Provide DataEntrySenderType 'tx' as configurable option (similar to SenderType 'tx' in TaskpoolSender)
2 participants