@@ -121,7 +121,7 @@ <h3 id="constructor">Constructor</h3>
121
121
</ tr >
122
122
< tr >
123
123
< td class ="col-md-4 ">
124
- < div class ="io-line "> Defined in < a href ="" data-line ="25 " class ="link-to-prism "> consolidated/rx-stomp/src/rx-stomp-rpc.ts:25 </ a > </ div >
124
+ < div class ="io-line "> Defined in < a href ="" data-line ="30 " class ="link-to-prism "> consolidated/rx-stomp/src/rx-stomp-rpc.ts:30 </ a > </ div >
125
125
</ td >
126
126
</ tr >
127
127
@@ -203,7 +203,7 @@ <h3 id="methods">
203
203
204
204
< tr >
205
205
< td class ="col-md-4 ">
206
- < div class ="io-line "> Defined in < a href ="" data-line ="50 " class ="link-to-prism "> consolidated/rx-stomp/src/rx-stomp-rpc.ts:50 </ a > </ div >
206
+ < div class ="io-line "> Defined in < a href ="" data-line ="56 " class ="link-to-prism "> consolidated/rx-stomp/src/rx-stomp-rpc.ts:56 </ a > </ div >
207
207
</ td >
208
208
</ tr >
209
209
@@ -278,7 +278,7 @@ <h3 id="methods">
278
278
279
279
< tr >
280
280
< td class ="col-md-4 ">
281
- < div class ="io-line "> Defined in < a href ="" data-line ="61 " class ="link-to-prism "> consolidated/rx-stomp/src/rx-stomp-rpc.ts:61 </ a > </ div >
281
+ < div class ="io-line "> Defined in < a href ="" data-line ="67 " class ="link-to-prism "> consolidated/rx-stomp/src/rx-stomp-rpc.ts:67 </ a > </ div >
282
282
</ td >
283
283
</ tr >
284
284
@@ -366,6 +366,11 @@ <h3 id="methods">
366
366
367
367
private _repliesObservable: Observable<IMessage>;
368
368
369
+ private _customReplyQueue: boolean = false;
370
+
371
+ // This is used to ensure that underlying subscription remains subscribed
372
+ private _dummySubscription: Subscription;
373
+
369
374
/**
370
375
* Create an instance, see the [guide](/guide/rx-stomp/ng2-stompjs/remote-procedure-call.html) for details.
371
376
*/
@@ -378,6 +383,7 @@ <h3 id="methods">
378
383
this._replyQueueName = stompRPCConfig.replyQueueName;
379
384
}
380
385
if (stompRPCConfig.setupReplyQueue) {
386
+ this._customReplyQueue = true;
381
387
this._setupReplyQueue = stompRPCConfig.setupReplyQueue;
382
388
}
383
389
}
@@ -408,10 +414,17 @@ <h3 id="methods">
408
414
const { destination, body, binaryBody } = params;
409
415
410
416
if (!this._repliesObservable) {
411
- this._repliesObservable = this._setupReplyQueue(
417
+ const repliesObservable = this._setupReplyQueue(
412
418
this._replyQueueName,
413
419
this.rxStomp
414
420
);
421
+
422
+ // In case of custom queue, ensure it remains subscribed
423
+ if (this._customReplyQueue) {
424
+ this._dummySubscription = repliesObservable.subscribe(() => {});
425
+ }
426
+
427
+ this._repliesObservable = repliesObservable;
415
428
}
416
429
417
430
return Observable.create((rpcObserver: Observer<IMessage>) => {
0 commit comments