Coder Social home page Coder Social logo

Possible bug with messages about flow HOT 5 CLOSED

ColtonMcInroy avatar ColtonMcInroy commented on August 28, 2024
Possible bug with messages

from flow.

Comments (5)

Will-create avatar Will-create commented on August 28, 2024 1

@ColtonMcInroy Yes, documentation should be updated. I thank you. Thanks alot

from flow.

ColtonMcInroy avatar ColtonMcInroy commented on August 28, 2024

I was incorrect, it was due to a bug with another interconnected component down the chain that I created. Spent some more time looking into it today and figured it out.

from flow.

ColtonMcInroy avatar ColtonMcInroy commented on August 28, 2024

Just a note that the reason the other component ended up having a bug was because the message id does not seem to get set which is something I depended on assuming that it would always be set and always be unique (created during the newmessage() call) but that doesn't appear to be the case. I am seeing it undefined and even if I create a message then set msg.id = GUID() before sending the message the message id still appears undefined in when examined from the next component.
The component is used to work with BullMQ which holds onto the message while the data gets processed and then sends the message to output once the BullMQ job has completed. I was queuing the messages in an object like so...

messages[$.id] = $;

Because $.id is actually undefined obviously this causes a problem. So currently what I am doing is checking if $.id is undefined and setting it to GUID() when it is. This works fine for my case as all I need is a unique identifier and generating it myself is not a problem... but perhaps $.id being undefined is an actual bug that should be addressed or perhaps it is intended for a different purpose that I cannot tell from the documentation.

With these details, I'll re-open the ticket and leave it up to you to determine if this is a bug... a lack of documentation explaining id reasoning for being undefined or something else.

from flow.

Will-create avatar Will-create commented on August 28, 2024

@ColtonMcInroy You should not expect to have msg.id or $.id because it does not have Unique identifier

from flow.

ColtonMcInroy avatar ColtonMcInroy commented on August 28, 2024

@Will-create According to the documentation...

The property contains a unique identifier for this message.

flowmessage.id;
// returns String;

If this is no longer correct or some details in regards to this are missing could you update the documentation?

from flow.

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.