Why am I seeing responseBody
as undefined, but I am able to see the subscribe response in msg_body? What could be causing this issue with responseBody
?
let stomp_subscription = this._stompService.subscribe('/topic/queue');
stomp_subscription.map((message: Message) => {
return message.body;
}).subscribe((msg_body: string) => {
console.log(`Received: ${msg_body}`);
this.responseBody = JSON.parse(msg_body);
console.log('RESPONSECODE' + this.responseBody.ResponseInfo.ResponseCode);
});