Skip to content

Commit

Permalink
feat(ActiveMQ): add ActiveMQ policy
Browse files Browse the repository at this point in the history
Not much going on here other than setting the default idle timeout
for new connections. ActiveMQ seems to be pretty stuck at 30s for
this value.
  • Loading branch information
mbroadst committed Oct 21, 2015
1 parent 271415c commit 5a718a3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/index.js
Expand Up @@ -13,6 +13,7 @@ module.exports = {
ServiceBusQueue: require('./policies/service_bus_queue_policy'),
ServiceBusTopic: require('./policies/service_bus_topic_policy'),
QpidJava: require('./policies/qpid_java_policy'),
ActiveMQ: require('./policies/activemq_policy'),
Utils: pu,
merge: function(newPolicy, base) {
return u.deepMerge(newPolicy, base || DefaultPolicy);
Expand Down
19 changes: 19 additions & 0 deletions lib/policies/activemq_policy.js
@@ -0,0 +1,19 @@
'use strict';

var u = require('../utilities'),
DefaultPolicy = require('./default_policy');

module.exports = u.deepMerge({
defaultSubjects: false,

connect: {
options: {
// By default ActiveMQ uses 30s for its idle timeout. The broker does not
// seem to honor a change to this value from the client side, and also does
// not send back that value as part of the handshake (it just returns
// whatever value we sent, without honoring that value)
idleTimeout: 30000,
}
}

}, DefaultPolicy);

0 comments on commit 5a718a3

Please sign in to comment.