Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Re: [tier-api] grouper rabbitmq messaging

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Re: [tier-api] grouper rabbitmq messaging


Chronological Thread 
  • From: Julio Polo <>
  • To: "Hyzer, Chris" <>
  • Cc: "Waldbieser, Carl" <>, TIER-API <>, grouper-users <>
  • Subject: Re: [grouper-users] Re: [tier-api] grouper rabbitmq messaging
  • Date: Tue, 12 Sep 2017 09:00:17 -1000
  • Ironport-phdr: 9a23:h+bezBKr8b5xlM33a9mcpTZWNBhigK39O0sv0rFitYgRI/3xwZ3uMQTl6Ol3ixeRBMOAuqIC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9ZDeZwZFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QKsqUjq+8ahkVB7oiD8GNzEn9mHXltdwh79frB64uhBz35LYbISTOfFjfK3SYMkaSHJDUcZfVyJPDICyYZYRAeUdJutXtZXxqkEUoBeiGQWhBuXiwSJIiH/s2q061vwsHwXb3AwkHtIOt2nfos/yNKcWVuC+0a7FzTfeb/NS2Df975PFchA7rvCCR71wcMvRxVMxGAzYk1WdsIroNC6W2OQVq2WX8ettWf6thmMipQF8oSOgytsph4TGmo4Z1k3I+CBlz4opJNC1TUt2bcC6HJROsSyRKpF4Tdk4Q25yvSY30r0GtoC/fCgN0JknwgTQa/2Dc4SR4xLjU/qdLS53hX57Zr6wmQy+8Uenyu37Wcm01EhFojBZndnLs3ABzx3T6s6ZRfth5kqtxzeC2xzR5+xBL0A5lrHUJ4Ikz7M/ipYfrVnPEyrql0nqjaKbc0Ap9va25+v5ernmo4WTN45wigHwKKQuncm/DPw6MggTW2ib+OO82abj/ULjTrRFlPw2kqjDvJ/EOMsbu7a1AxVJ3YY79xa/EzCm3cwXnXkdK1JFZQqHgJbzO13XPfD4Fumwg063kDpww/DGP6bhAonWLnTdirvhfLB961JCxwopy9BQ+Y5UBq8bLP3tR0DxqY+QMhhseSyl0ev9TJ1W1pkfQijHVqqSMLLAvEWg5/kkZfSUaYkT/jvxNq52yeTpiCobhFsceuGR2p8QICS6A/BnJG2ZaGXlg9ZHHGsX6FltBNf2gUGPBGYAL025WLgxs3RiUNqr

Message routing keys are useful.  Without it, you'll need to receive every message for every change made to Grouper and decide which ones to use and which ones to discard.

The common misconception is that you publish a message to a queue, but in reality you publish to an exchange.  You can set up a queue that listens for specific messages on that exchange.  That same queue can also listen for messages from another exchange, so thats a queue with two bindings.    If your student information system publishes to a sis-exchange and your human resources publishes to a hris-exchange, you could set up a single queue for an enterprise deprovisioning application which gets messages from both SoR.  Interestingly, you could also publish a message that doesn't go into any queue because the message's routing key doesn't match any queue binding.

-julio

On Tue, Sep 12, 2017 at 7:55 AM, Hyzer, Chris <> wrote:
I think we could swing that...

So we want to be able to set a route key for an exchange, could be static, or could be based on group name, and you could do some replaces like the unicon one.

Anything else?

Is a routing key a rabbitmq specific thing or does aws and activemq have a similar feature?

Thanks
Chris

-----Original Message-----
From: Waldbieser, Carl [mailto:]
Sent: Tuesday, September 12, 2017 11:47 AM
To: Hyzer, Chris <>
Cc: Julio Polo <>; TIER-API <>; grouper-users <>
Subject: Re: [grouper-users] Re: [tier-api] grouper rabbitmq messaging

Chris,

The message is typically sent to an exchange rather than directly to a queue.
If the exchange uses routing keys at all, you need some way to apply a key.
There could be potentially a lot of different ways you might do this.

It might be nice if there was some kind of component you could plug in to apply a route.  In Julio's example that group-to-route mapping seems like a valid way to do it.

The approach we took is different-- the initial message always has a route key that looks like "ORIGIN.pds", where "ORIGIN" would be a tag unique to a source system (e.g. "grouper") and "pds" is a tag for a component in our pipeline that interprets messages from various sources, applies any additional information to the messages, and applies a new route label based on more complex routing rules.

In our case, the initial route label from Grouper would essentially be static.

Thanks,
Carl Waldbieser
ITS Systems Programmer
Lafayette College

----- Original Message -----
From: "Chris Hyzer" <>
To: "Julio Polo" <>
Cc: "TIER-API" <>, "grouper-users" <>
Sent: Tuesday, September 12, 2017 9:19:56 AM
Subject: [grouper-users] Re: [tier-api] grouper rabbitmq messaging

So do you enable routing to that queue or it automatically sends to all group queues or only if they exist?

________________________________
From: Julio Polo <>
Sent: Tuesday, September 12, 2017 12:38:16 AM
To: Hyzer, Chris
Cc: TIER-API; grouper-users
Subject: Re: [tier-api] grouper rabbitmq messaging

Great to see that Grouper will natively support RabbitMQ.  Can it support a feature to map a groupName into a message routing key used when publishing the message?  This would make it easier for applications to get only the messages they want.

For example, if the groupName in the JSON is "student:registration:2017:fall:math:101", a default rule that replaces colons with periods will automatically give me the message routing key student.registration.2017.fall.math.101.  If I only wanted to get messages for MATH registration groups, I can set up a queue with this binding: student.registration.#.math.#

This groupName-to-message-routing-key mapping is a feature that is currently supported in the Grouper-RabbitMQ work that Unicon did for us:

https://github.com/Unicon/grouper-amqp-esb-publisher

# SpEL-based regex replacement definition. The chain of 'replaceFirst' method calls will be applied to an extracted group name (String) at runtime
# See: http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#replaceFirst(java.lang.String,%20java.lang.String)
changeLog.consumer.esbAmqp.regexReplacementDefinition = replaceFirst('^hawaii.edu:', 'group.modify.').replaceFirst('(:enrolled|:waitlisted|:withdrawn)$', '')
changeLog.consumer.esbAmqp.replaceRoutingKeyColonsWithPeriods = true

-julio


On Sun, Aug 6, 2017 at 11:39 PM, Hyzer, Chris <<mailto:>> wrote:

Making progress on Grouper RabbitMQ messaging.


https://spaces.internet2.edu/display/Grouper/Grouper+Messaging+with+RabbitMQ


Got the configuration ironed out, made a rabbitmq-connector tarball, theres a patch and snapshot client release since it needed some things, and the grouperInstaller will install this component.


Still kicking the tires here...


Thanks

Chris




Archive powered by MHonArc 2.6.19.

Top of Page