Giter Site home page Giter Site logo

Comments (8)

cressie176 avatar cressie176 commented on June 12, 2024 1

OK, thanks anyway

from amqplib.

cressie176 avatar cressie176 commented on June 12, 2024 1

You can force a timestamp using the following syntax

x-stream-offset’: { ‘!’: ‘timestamp’, value: 1686519750 }

Where 1686519750 is the number of seconds (as opposed to miliseconds) since 00:00:00 UTC, 1970-01-01

from amqplib.

snird avatar snird commented on June 12, 2024

I have tried to use the coded of this lib: https://github.com/amqp-node/amqplib/blob/4993dee433665e9e6fe7729f3eaeacca06b46cb7/lib/codec.js

but so far I was not succesful.
I guess that I have to use it, to encode a timestamp correctly.

Can someone shed some light on how to do that?

from amqplib.

snird avatar snird commented on June 12, 2024

I'm now using https://github.com/coders51/rabbitmq-stream-js-client instead.
It required some work as it is still experimental, but mostly merging locally the open PRs was enough.
I only consume through the rabbitmq-stream-js-client lib, to publish and create I still do through amqplib.

Just letting people here know in case they try to use streams.

Maybe worth noting in the "streams example" in this repo that timestamp offsets don't work currently.

from amqplib.

cressie176 avatar cressie176 commented on June 12, 2024

Hi @snird,

Thank you. I did have a look over the weekend but couldn't get the streams example working either. Do you have a public repo with the working version of rabbitmq-stream-js-client? I'd like to see what the x-stream-offset timestamp looks like with Wireshark and compare with amqplib

Thanks

Steve

from amqplib.

snird avatar snird commented on June 12, 2024

I don't have it public, as it is still on testing phase on my side.

Anyway, that won't help your case: the https://github.com/coders51/rabbitmq-stream-js-client lib uses the binary format of streams in RabbitMQ. That's not amqp 0.9.1 at all, so there are no possible comparisons.

from amqplib.

cressie176 avatar cressie176 commented on June 12, 2024

I'll leave this issue open until I've added something to the streams example & documentation

from amqplib.

cressie176 avatar cressie176 commented on June 12, 2024

Done. Thanks for opening this issue @snird, it was interesting.

from amqplib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.