@Test public void testGetGroupId() throws Exception { DefaultCMessagingConfigService s = createServiceWithXml("consume_both.xml"); assertEquals("hermes-cid0", s.getGroupId("ex1", "cid0")); assertEquals("hermes-cid1", s.getGroupId("ex1", "cid1")); assertNull(s.getGroupId("ex1", "cid10")); }
@Override public String getGroupId(String exchangeName, String idAndQueueName) { Exchange exchange = findExchange(exchangeName); String result = null; if (exchange != null) { ConsumeGroup group = exchange.getConsume().findConsumeGroup(idAndQueueName); if (group != null) { result = group.getHermesConsumerGroup(); } } return result; }
DefaultCMessagingConfigService implements CMessagingConfigService, Initializable { @Override public String getGroupId(String exchangeName, String idAndQueueName) { Exchange exchange = findExchange(exchangeName); String result = null; if (exchange != null) { ConsumeGroup group = exchange.getConsume().findConsumeGroup(idAndQueueName); if (group != null) { result = group.getHermesConsumerGroup(); } } return result; } }
DefaultCMessagingConfigService implements CMessagingConfigService, Initializable { @Override public String getGroupId(String exchangeName, String idAndQueueName) { Exchange exchange = findExchange(exchangeName); String result = null; if (exchange != null) { ConsumeGroup group = exchange.getConsume().findConsumeGroup(idAndQueueName); if (group != null) { result = group.getHermesConsumerGroup(); } } return result; }  }
DefaultCMessagingConfigService implements CMessagingConfigService, Initializable { @Override public String getGroupId(String exchangeName, String idAndQueueName) { Exchange exchange = findExchange(exchangeName); String result = null; if (exchange != null) { ConsumeGroup group = exchange.getConsume().findConsumeGroup(idAndQueueName); if (group != null) { result = group.getHermesConsumerGroup(); } } return result; }  @Override String getTopic(String exchangeName); @Override String getGroupId(String exchangeName, String idAndQueueName); @Override boolean isHermesProducerEnabled(String exchangeName, String identifier, String ip); @Override int getConsumerType(String exchangeName, String identifier, String ip); @Override void initialize(); }
DefaultCMessagingConfigService implements CMessagingConfigService, Initializable { @Override public String getGroupId(String exchangeName, String idAndQueueName) { Exchange exchange = findExchange(exchangeName); String result = null; if (exchange != null) { ConsumeGroup group = exchange.getConsume().findConsumeGroup(idAndQueueName); if (group != null) { result = group.getHermesConsumerGroup(); } } return result; }  @Override String getTopic(String exchangeName); @Override String getGroupId(String exchangeName, String idAndQueueName); @Override boolean isHermesProducerEnabled(String exchangeName, String identifier, String ip); @Override int getConsumerType(String exchangeName, String identifier, String ip); @Override void initialize();  }