Include Page | ||||
---|---|---|---|---|
|
Info |
---|
The info on this page applies to Grouper 2.5 and above. |
The Grouper Messaging system interface will have a has an ActiveMQ implementation.
Install ActiveMQ
On windows, install erlang, then install RabbitMQ
Get the management ui working (do this as an administrator)
Code Block |
---|
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.10\sbin>rabbitmq-plugins.bat enable rabbitmq_management |
Restart RabbitMQ service as an administrator (e.g. in windows in local services console)
Login to http://localhost:15672/ with guest/guest
Default port is 5672
On Mac, Download RabbitMQ ActiveMQ from httpshttp://wwwactivemq.rabbitmqapache.comorg/installactivemq-standalone5150-macrelease.html. Unzip the file and go to sbin bin directory. Run "./rabbitmq-serveractivemq console". It will launch rabbimq ActiveMQ server and the web client.
Login to http://localhost:15672/ with guest/guestNote: Grouper Rabbitmq 8161 to access the web UI.
Notes:
- Grouper ActiveMQ messaging client uses qpid-jms-client 0.41.0 to connect to the broker which supports amqp 1.0.
- Grouper ActiveMQ messaging doesn't support acknowledging the individual messages
...
- . acknowledge method is a No-Op.
- Clients always have to set the autoCreateObjects property to true while calling send and receive messages on GrouperMessagingActiveMQSystem object.
Set the following properties in grouper.client.properties file
Code Block |
---|
# class that implements edu.internet2.middleware.grouperClient.messaging.GrouperMessagingSystem grouper.messaging.system.activeMqSystem.class = edu.internet2.middleware.grouperMessagingActiveMQ.GrouperMessagingActiveMQSystem grouper.messaging.system.activeMqSystem.name=activeMqSystem # host address of activemq queue grouper.messaging.activemqsystem.messsagingactiveMqSystem.host = localhost # port of activemq queue grouper.messaging.activemqsystem.messsagingactiveMqSystem.port = 5672 # username of activemq queue grouper.messaging.activemqsystem.messsagingactiveMqSystem.username = # password of activemq queue grouper.messaging.activemqsystem.messsagingactiveMqSystem.password = # number of seconds to sleep while waiting grouper.messaging.activemqsystem.messagingactiveMqSystem.polling.sleep.seconds = 5 grouper.messaging.activemqsystem.messagingactiveMqSystem.defaultPageSize = 5 grouper.messaging.activemqsystem.messagingactiveMqSystem.maxPageSize = 10 |
|
Here is an esb example of sending messages
Code Block |
---|
#####################################
## Messaging integration with ESB, send change log entries to a messaging system
#####################################
# note, change "messagingEsb" in key to be the name of the consumer. e.g. changeLog.consumer.myAzureConsumer.class
# note, routingKey property is valid only for rabbitmq. For other messaging systems, it is ignored.
# {valueType: "class", readOnly: true, mustExtendClass: "edu.internet2.middleware.grouper.changeLog.ChangeLogConsumerBase"}
changeLog.consumer.cmuActiveMQ.class = edu.internet2.middleware.grouper.changeLog.esb.consumer.EsbConsumer
# quartz cron
# {valueType: "cron"}
changeLog.consumer.cmuActiveMQ.quartzCron = 0 * * * * ?
# el filter
# {valueType: "string", regex: "^changeLog\\.consumer\\.([^.]+)\\.elfilter$"}
changeLog.consumer.cmuActiveMQ.elfilter = event.eventType eq 'GROUP_DELETE' || event.eventType eq 'GROUP_ADD' || event.eventType eq 'MEMBERSHIP_DELETE' || event.eventType eq 'MEMBERSHIP_ADD'
# publishing class
# {valueType: "class", readOnly: true, mustExtendClass: "edu.internet2.middleware.grouper.changeLog.esb.consumer.EsbMessagingPublisher"}
changeLog.consumer.cmuActiveMQ.publisher.class = edu.internet2.middleware.grouper.changeLog.esb.consumer.EsbMessagingPublisher
# messaging system name
# {valueType: "string", regex: "^changeLog\\.consumer\\.([^.]+)\\.messagingSystemName$"}
changeLog.consumer.cmuActiveMQ.publisher.messagingSystemName = cmuActiveMQ
# queue or topic
# {valueType: "string", regex: "^changeLog\\.consumer\\.([^.]+)\\.publisher\\.messageQueueType$"}
changeLog.consumer.cmuActiveMQ.publisher.messageQueueType = queue
# queue or topic name
# {valueType: "string", regex: "^changeLog\\.consumer\\.([^.]+)\\.publisher\\.queueOrTopicName$"}
changeLog.consumer.cmuActiveMQ.publisher.queueOrTopicName = test.grouper.ws |
...