diff --git a/lib/stomp-utils.js b/lib/stomp-utils.js index 8e70a5c..999397e 100644 --- a/lib/stomp-utils.js +++ b/lib/stomp-utils.js @@ -63,7 +63,7 @@ var stompUtils = { genId: genId, tokenizeDestination: function (dest) { - return dest.substr(dest.indexOf('/') + 1).split('.'); + return dest.substr(dest.lastIndexOf('/') + 1).split('.'); }, sendCommand: function (socket, command, headers, body, want_receipt) {