You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "smuehlmann (via GitHub)" <gi...@apache.org> on 2024/04/22 18:27:29 UTC
[D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
GitHub user smuehlmann created a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;`
Set values:
` Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
`
Send message:
` MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
`
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Python Producer Message to InfluxDBv2 sink connector with [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Python Producer Message to InfluxDBv2 sink connector with
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector. Especially the message content / payload in combination with the used producer schema is my problem. The Pulsar Version is 3.2.2.
With java code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`public` String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;`
Set values:
`Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);`
Send message:
`
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
`
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}`
Set values:
`Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);`
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
` public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;`
Set values:
`Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);`
Send message:
`
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
`
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}`
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}`
Set values:
`
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);`
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
` public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;`
Set values:
` Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
`
Send message:
` MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
`
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;`
}
Set values:
`
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
`
Send message:
`
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
`
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Python Producer Message to InfluxDBv2 sink connector with [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Python Producer Message to InfluxDBv2 sink connector with
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}`
Set values:
`Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);`
Send message:
`
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
`
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}`
Set values:
`Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);`
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 Message for InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 Message for InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;`
Set values:
`Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);`
Send message:
`
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
`
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}`
Set values:
`Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);`
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Python Producer Message to InfluxDBv2 sink connector [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Python Producer Message to InfluxDBv2 sink connector
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector. Especially the message content / payload in combination with the used producer schema is my problem. The Pulsar Version is 3.2.2.
With java code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Python Producer Message to InfluxDB v2 sink connector [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Python Producer Message to InfluxDB v2 sink connector
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector. Especially the message content / payload in combination with the used producer schema is my problem. The Pulsar Version is 3.2.2.
With java code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Python Producer Message to InfluxDB v2 sink connector [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Python Producer Message to InfluxDB v2 sink connector
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDB v2 sink connector. Especially the message content / payload in combination with the used producer schema is my problem. The Pulsar Version is 3.2.2.
With java code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;`
}
Set values:
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org
Re: [D] Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer [pulsar]
Posted by "smuehlmann (via GitHub)" <gi...@apache.org>.
GitHub user smuehlmann edited a discussion: Pulsar 3.2.2 correct Message Format send to InfluxDBv2 sink connector with Python Producer
Hi,
i have problems to send a message with a python producer which should be processed by an InfluxDBv2 sink connector.
With a java test code it is possible.
Java class:
`
public class Device {
public String measurement;
public long timestamp;
public Map<String, String> tags;
public Map<String, Object> fields;
}`
Set values:
`
Device device = new Device();
device.measurement = "test5";
device.timestamp = Instant.now().toEpochMilli();
device.tags = Maps.newHashMap();
device.tags.put("foo", "bar");
device.fields = Maps.newHashMap();
device.fields.put("temp", 14.8);
`
Create producer:
Producer<Device> producer = client.newProducer(JSONSchema.of(Device.class))
.topic("persistent://public/default/foobar")
.producerName("test")
.create();
Send message:
MessageId msgID = producer.newMessage()
.key("test")
.value(device)
.send();
Any suggestions how to do with Python ?
Thanks
GitHub link: https://github.com/apache/pulsar/discussions/22558
----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org