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

Change insert node output #37

Open
smyrman opened this issue May 26, 2021 · 4 comments
Open

Change insert node output #37

smyrman opened this issue May 26, 2021 · 4 comments
Labels
proposal Something that is up for discussion.

Comments

@smyrman
Copy link
Contributor

smyrman commented May 26, 2021

This is suggested as an extension to #36.

We might consider to change the node output to not contain raw requests, but an aggregate of the msg.ack field.

Suggestion:

  • Output 1: the aggregated content of msg.ack for data updates on success.
  • Output 2: the aggregated content of msg.ack for meta data updates on success.

I.e. consider the following messages:

{
  _msgid: 1,
  ack: ["a1", "a1-2"],
  payload: {...}
}
{
  _msgid: 2,
  // ack undefined
  payload: {...},
  signal: {...}
}
{
  _msgid: 3,
  ack: ["a3"],
  payload: {...},
  signal: {...}
}
{
  _msgid: 4,
  ack: ["a4"],
  signal: {...}
}

The aggregated output 1 on success is:

  • {msgs: [1,2,3], ack:["a1","a1-2","a3"]} // all messages with data.

The aggregated output 2 on success is:

  • {msgs:[3,4], ack: ["a3", "a4"]} // all messages with meta data.

Errors, are logged, while the detailed response is discarded both on success and on error.

@smyrman smyrman added the proposal Something that is up for discussion. label May 26, 2021
@khtufteland
Copy link
Contributor

I like the main idea of this proposal, but it makes a quite big assumption: it assumes that most source system is Pub/Sub (or similar with acknowledging mechanics) which is the case for our existing integrations using Telegraf, via Google Pub/Sub to Node-RED. But this a legacy strategy, all new integrations are implemented in Node-RED directly. And whenever existing integrations require an update, I will always consider migrating the integrations to Node-RED.

@smyrman
Copy link
Contributor Author

smyrman commented May 27, 2021

We should definitively adapt, evolve this.

There seam to be some "ack" nodes in node-red:

We could have a look at what they are doning, and which message fields they are inspecting.

@smyrman
Copy link
Contributor Author

smyrman commented May 27, 2021

Somehow related (if splitting a message!)

@smyrman smyrman mentioned this issue Jun 29, 2021
@smyrman
Copy link
Contributor Author

smyrman commented Jun 29, 2021

I think it would be OK to ignore split messages (sequences) in the initial version. That is, for a split message to be acked correctly, it must be joined before it's passed to the input node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Something that is up for discussion.
Projects
None yet
Development

No branches or pull requests

2 participants