Skip to content

Commit

Permalink
opt-in weaver messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed May 1, 2019
1 parent ce4864b commit e6c25c1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import edu.tamu.weaver.messaging.model.MessageAction;

@Service
@Profile("!test")
@Profile("weaver-messaging")
@Import(MessagingConfig.class)
public class MessageListenerService {

Expand All @@ -34,7 +34,7 @@ public class MessageListenerService {
@Autowired
private List<ManifestService> manifestServices;

@WeaverMessageListener(destination = "${iiif.messaging.channel:cap}", containerFactory = "topicContainerFactory")
@WeaverMessageListener(destination = "${messaging.channels.cap:cap}", containerFactory = "topicContainerFactory")
private void update(Map<String, String> message) {
MessageAction action = MessageAction.valueOf(message.get("action"));
switch (action) {
Expand Down
14 changes: 9 additions & 5 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@ logging:
org.springframework: INFO
path: /var/logs/iiif

# to enable messaging, include profile weaver-messaging and update activemq broker-url, username and password

spring:
activemq:
broker-url: tcp://srv-message-broker-dev.library.tamu.edu:61616
user: admin
password: admin
broker-url: tcp://localhost:61616
user: username
password: password
redis:
host: localhost
port: 6379
profiles:
active: production
include: dspace, fedora

messaging:
channels:
cap: cap

iiif:
admins:
-
username: admin
password: abc123
messaging:
channel: cap
service:
url: http://localhost:${server.port}${server.contextPath}
connection:
Expand Down
6 changes: 0 additions & 6 deletions src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ logging:
path: /var/logs/iiif

spring:
activemq:
broker-url: tcp://srv-message-broker-dev.library.tamu.edu:61616
user: admin
password: admin
redis:
host: localhost
port: 6380
Expand All @@ -26,8 +22,6 @@ iiif:
-
username: admin
password: abc123
messaging:
channel: cap
service:
url: http://localhost:${server.port}${server.contextPath}
connection:
Expand Down

0 comments on commit e6c25c1

Please sign in to comment.