You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pulsar.apache.org by Apache Pulsar Slack <ap...@gmail.com> on 2019/01/05 09:11:02 UTC

Slack digest for #general - 2019-01-05

2019-01-04 09:23:00 UTC - Michael-Yu: i want send multiple message as MessageObjectA and MessageObjectB to topic demo1,the two message are not a same pojo object,so i want to create    two different producer with different schema version,how i can do this case, anyone have code this case or not
----
2019-01-04 10:09:06 UTC - Sijie Guo: @Michael-Yu currently it is not allowed to so. because the schema of MessageObjectA and MessageObjectB will be different.

I am curious about your use case and why do you want to do that? and how do you expect your consumer to consume?
----
2019-01-04 10:26:44 UTC - bossbaby: @Sijie Guo i have a question that Kafka can be used as a storage, can Pulsar also be used as a storage to store our Blockchain data?
----
2019-01-04 10:32:01 UTC - Yuvaraj Loganathan: Pulsar would be better fit than kafka here.
----
2019-01-04 10:35:18 UTC - bossbaby: thanks Yuva but im not sure data will not lost when storage long time
----
2019-01-04 10:37:30 UTC - Yuvaraj Loganathan: @bossbaby Pulsar uses bookeeper which has all the goodness of reliable storage also pulsar has tiered storage. You can offload the old data to s3 or any object storage for reliable long term storage.
----
2019-01-04 10:41:12 UTC - bossbaby: Thanks you bro
----
2019-01-04 11:01:55 UTC - Michael-Yu: once i send messageA to topic, but while the businesis improve, we need to add more filed to messageA object, the schema will be response incompilable err , i have there have multiply schema version for this topic, so i want to solve this error, i want use code like this to
----
2019-01-04 12:05:50 UTC - Chris Miller: I'm trying to understand when it would make sense to use Consumer.seek() vs a Reader. One difference I see is that hasMessageAvailable() is not available on Consumer (is that an oversight?), but otherwise Reader seems to provide a subset of Consumer functionality (indeed, it wraps and generally delegates to ConsumerImpl). Given that, wouldn't it make sense for Reader to be made a parent interface to Consumer? Though I appreciate the behaviour of ReaderImpl and ConsumerImpl are somewhat different (eg ReaderImpl auto-acknowledges). Thoughts/comments?
----
2019-01-04 16:59:53 UTC - Craig Yoshioka: @Craig Yoshioka has joined the channel
----
2019-01-04 19:35:40 UTC - Grant Wu: @Matteo Merli I’ve finding that `context.get_current_message_topic_name()` is giving me back the topic pattern when I call it in a Pulsar function subscribed to a pattern
----
2019-01-04 19:35:51 UTC - Grant Wu: This seems counterintuitive
----
2019-01-04 19:36:26 UTC - Grant Wu: i.e. I’m subscribed to `foo-.*`, I publish to `foo-1234`, function is invoked, but `context.get_current_message_topic_name() == "foo.*"`
----
2019-01-04 19:44:18 UTC - Grant Wu: Also, I tried seeing if maybe it was in the message properties map…?  But I am getting this:
```
Traceback (most recent call last):
  File "/Users/grant.wu/fakebin/apache-pulsar-2.2.1/instances/python-instance/python_instance.py", line 267, in actual_execution
    output_object = self.function_class.process(input_object, self.contextimpl)
  File "/tmp/pulsar_functions/public/default/projectNotifications/0/projectNotifications.py", line 15, in process
    print("The message properties are: {}".format(context.get_message_properties()))
AttributeError: 'ContextImpl' object has no attribute 'get_message_properties'
```
----
2019-01-04 19:46:01 UTC - Grant Wu: I ran `dir()` on the context object and I am getting:
```
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'accumulated_metrics', 'ack', 'consumers', 'current_accumulated_metrics', 'current_input_topic_name', 'current_message_id', 'current_start_time', 'get_and_reset_metrics', 'get_current_message_topic_name', 'get_function_id', 'get_function_name', 'get_function_namespace', 'get_function_tenant', 'get_function_version', 'get_instance_id', 'get_logger', 'get_message_id', 'get_metrics', 'get_output_serde_class_name', 'get_output_topic', 'get_user_config_map', 'get_user_config_value', 'instance_config', 'log', 'publish', 'publish_producers', 'publish_serializers', 'pulsar_client', 'record_metric', 'reset_metrics', 'set_current_message_context', 'user_code_dir', 'user_config']
```
----