-
Notifications
You must be signed in to change notification settings - Fork 28
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
Individual mailboxes cannot be created except via properties #99
Comments
Hi @bwehrle We can code configure all mailbox plugins. Please see:
|
@bwehrle Per this Slack message from @pflueras, would you please provide clarification on your request?
Neither one of us understands how you intend for this this to be used. Can you please provide a concrete use case? |
@bwehrle Would you please ^^^ comment on the previous two comments, or at least the last one? We don't understand how you intend to use dynamic, in-code configuration. |
@bwehrle Additionally I just implemented the single "arrayQueue" mailbox per actor instance. If a developer needs a kind of "shared mailbox" they can use one of the following router types:
The implementation is in the current SNAPSHOT. |
Sorry for falling behind on the threads here: The problem with using the code configuration is that when I filed the issue the API for creating a ManyToOne mailbox did not allow the name to be specified. This was only available from properties. In addition, writing N properties is not a solution for dynamic number of actors. I think that only leaves one options: define a type of mailbox and the properties that configure it Let me paraphrase this with some pseudo code to make it really clear.
Again, sorry for running behind: please ping me in gitter if I don't respond on an issue. |
The API has always supported creating an actor with a mailbox by name. You used it in your overflow test:
Notice:
Do any of these address what you are looking for? If we are missing any |
Therefore there is no way to create configurations programatically when different plugin configurations are needed. The most relevant case for this is that of the ManyToOneConcurrentArrayQueuePlugin. This mailbox type requires that there only be 1 mailbox per actor (it is M:1). See https://docs.vlingo.io/xoom-actors#mailbox - scroll to "arrayQueueMailbox" section.
As discussed with @VaughnVernon the existing system for mailbox configuration is limited to creating a single mailbox with a single given name. In the Configuration class, there is a configurationOverrides (Map<String, PluginConfiguration>). There is only one Plugin Configuration allowed per Plugin.
A better solution might include a plugin that creates a new mailbox dynamically for each actor that requests one; instead of specifying the mailbox name, the actor instantiation can request a mailbox configuration name, and an actual mailbox with this configuration can either be created or re-used, depending on the plugin configuration.
The text was updated successfully, but these errors were encountered: