Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not send with expires #47

Open
jeek120 opened this issue Oct 9, 2018 · 1 comment
Open

can not send with expires #47

jeek120 opened this issue Oct 9, 2018 · 1 comment

Comments

@jeek120
Copy link

jeek120 commented Oct 9, 2018

followed code can send
w.Send("/queue/room_" + room_no, "", bs)

but followed code can not send
w.Send("/queue/room_" + room_no, "", bs, stomp.SendOpt.Receipt, stomp.SendOpt.Header("expires", "2049-12-31 23:59:59" /*time.Unix(end,0).Format("2006-01-02 15:04:05")*/ )/*, stomp.SendOpt.Header("priority", fmt.Sprintf("%d", p))*/)

ActiceMq 5.15.6
docker run -dt -P webcenter/activemq

@hanjm
Copy link

hanjm commented Feb 11, 2019

@jeek120 the header "expires" value is the milliseconds timestamp. see https://github.com/apache/activemq/blob/9abe2c6f97c92fc99c5a2ef02846f62002a671cf/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTimeStampingBrokerPluginTest.java#L94

strconv.FormatInt(time.Now().Add(yourMessageTimeoutDuration).UnixNano()/1e6, 10)

janelletavares pushed a commit to janelletavares/stomp that referenced this issue Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants