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

Create a RulesAction to publish messages to our Camel Broadcaster #468

Closed
dannylamb opened this issue Dec 16, 2016 · 1 comment
Closed
Assignees

Comments

@dannylamb
Copy link
Contributor

dannylamb commented Dec 16, 2016

Depends on #448, #466, and #467

We need a rules action that will accept the message from our EventGenerator actions and allow users to enter multiple queues into a UI for broadcasting. The annotation will look something like this:

/**
 * Provides an action to generate a serialized Update event.
 *
 * @RulesAction(
 *   id = "islandora_message_broadcaster",
 *   label = @Translation("Broadcast Event"),
 *   category = @Translation("Islandora"),
 *   context = {
 *     "message" = @ContextDefinition("string",
 *       label = @Translation("Event message")
 *     ),
 *     "recipients" = @ContextDefinition("string",
 *       label = @Translation("Message Recipients"),
 *       description = @Translation("Queues/Topics to receive the message"),
 *       multiple = TRUE
 *     ),
 *   }
 * )
 */

Combine the array received by recipients into a comma separated list, and insert it as the IslandoraBroadcastRecipients header. Using the publishing service from #467, you should publish the event to the Camel broadcaster, whose queue (islandora-connector-broadcast by default) should be retrieved from configuration. So you'll need to add that to the islandora module's config form.

As far as tests are concerned, we cannot do a full IT test since Alpaca is not on the Travis environment, but we should still test that a message gets published to islandora-connector-broadcast and has the correct headers/message.

@dannylamb
Copy link
Contributor Author

@Islandora-CLAW/committers #31 is up to resolve this issue.

@whikloj whikloj closed this as completed Jan 27, 2017
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

No branches or pull requests

1 participant