Messages from the Grouper messaging system from a queue can be read by Grouper and treated like a web service call.
Hook up grouper WS to read from a queue:
grouper-ws.properties
# there can be multiple entries, "wsMessagingBridge" is the name of this one, change that for each config section # the messaging system name must correspond to a messaging system in the grouper.client.properties grouper.webservice.messaging.wsMessagingBridge.messagingSystemName = grouperBuiltinMessaging # the queue or topic to check grouper.webservice.messaging.wsMessagingBridge.queueOrTopicName = sampleWsMessagingQueue # if this is a "queue" or "topic", generally it will be queue grouper.webservice.messaging.wsMessagingBridge.messageQueueType = queue # the source id of the source of the user to act as grouper.webservice.messaging.wsMessagingBridge.actAsSubjectSourceId = g:isa # the subject id of the user to act as grouper.webservice.messaging.wsMessagingBridge.actAsSubjectId = GrouperSystem # the number of seconds between checking the queue or topic grouper.webservice.messaging.wsMessagingBridge.secondsBetweenChecks = 0 # the long polling seconds, listen to the queue for this many seconds for messages grouper.webservice.messaging.wsMessagingBridge.longPollingSeconds = 20 |
That will cause all WS servers to listen on a queue or topic for messages
{ "grouperHeader": { "messageVersion": "1", //mandatory "grouperWebServicesVersion": "v2_3_000", //mandatory "timestamp": "2012-04-23T18:25:43.511Z", //timestamp message sent, mandatory "type": "grouperMessagingToWebService", //says what type of message, mandatory "endpoint" : "WsRestAddMemberRequest", //which endpoint, mandatory "messageUuid", : "abc123", //for logging, mandatory "replyToQueueOrTopicName", "someQueue", //if replying, optional "replyToQueueOrTopic", "queue" //if replying, "queue" or "topic", optional }, // this is simply the json body of any grouper json web service normal or lite "WsRestAddMemberRequest":{ "subjectLookups":[ { "subjectId":"test.subject.0", "subjectSourceId":"jdbc" } ] , "wsGroupLookup":{ "groupName":"test:testGroup" } } } |