try {
{
SubscribeKey key = new SubscribeKey(glob, publishOid);
SubscribeQos qos = new SubscribeQos(glob);
qos.setWantLocal(false);
this.updateInterceptor1 = new MsgInterceptor(glob, log, null); // Collect received msgs
SubscribeReturnQos ret = this.connection.subscribe(key.toXml(), qos.toXml(), this.updateInterceptor1);
subscribeId1 = ret.getSubscriptionId();
}
{
SubscribeKey key = new SubscribeKey(glob, publishOid);
SubscribeQos qos = new SubscribeQos(glob);
qos.setWantLocal(true);
this.updateInterceptor2 = new MsgInterceptor(glob, log, null); // Collect received msgs
SubscribeReturnQos ret = connection.subscribe(key.toXml(), qos.toXml(), this.updateInterceptor2);
subscribeId2 = ret.getSubscriptionId();
}
} catch(XmlBlasterException e) {
log.warning("XmlBlasterException: " + e.getMessage());