Closed iamvasim786 closed 7 years ago
@iamvasim786 Could you provide a full code snippet?
@beevelop this is my code -
var connectHeaders = {login:"xxx",passcode:"xxx",heart-beat:"20000,50000"};
$stomp
.connect('/endpoint', connectHeaders)
// frame = CONNECTED headers
.then(function (frame) {
var subscription = $stomp.subscribe('/dest', function (payload, headers, res) {
$scope.payload = payload
}, {
'headers': 'are awesome'
})
// Unsubscribe
subscription.unsubscribe()
// Send message
$stomp.send('/dest', {
message: 'body'
}, {
priority: 9,
custom: 42 // Custom Headers
})
})
Looking into the stomp-websocket docs, it seems as if this is not possible via connect headers: http://jmesnil.net/stomp-websocket/doc/#heartbeat
I'm thinking about making heartbeat.outgoing
and heartbeat.incoming
configurable with the help of an Angular-Provider.
@iamvasim786 You can checkout the feature-heartbeat
branch. You should be able to configure incoming and outgoing heartbeat settings with the $stompProvider:
foobar.config(function ($stompProvider) {
$stompProvider.setIncomingHeartbeat(1337)
$stompProvider.setOutgoingHeartbeat(1337)
})
All the rest should be backwards compatible with the Readme example.
thanks, it's working now .
@iamvasim786 Thank your for verifying. I'll incorporate the changes into the next release.
how to set heart-beat value in headers ? ex - headers ={ login:"",passcode:"",heart-beat:"20000,50000"} not work for me.