My guess is that you're getting a message related to there being no
overload of the Producer.send method that accepts a String.

In your Java code, you're calling String.getBytes you need to do the same
in you Clojure code.

--Aaron

On Sun, Oct 16, 2016 at 2:42 AM, hiskennyness <kentil...@gmail.com> wrote:

> Not sure if this is a Java question or Clojure question, but I think it is
> the latter.
>
> I am trying to use the Yahoo pulsar library https://mvnrepository.
> com/artifact/com.yahoo.pulsar/pulsar-client/1.14 from Clojure.
>
> It is going OK in general, but a couple times now trying to replicate Java
> code such as:
>
> Producer producer = client.createProducer("persistent://sample/
> standalone/ns1/my-topic");
>
> ..with:
>
>   (let [prod (.createProducer client "persistent://sample/
> standalone/ns1/ktopic")]
>         ....)
>
> ...all goes well except I end up with prod bound to an instance of
> ProducerImpl.
>
> My Java is zilch but I presume the Java code binding the impl to a var
> type Producer is why the code can then execute:
>
> producer.send("my-message".getBytes());
>
> ...whereas I get an error about send not being defined when I do:
>
> (.send prod "Hi Mom")
>
> I looked around for a way to "cast" the impl to a Producer but came up
> empty.
>
> I did find a public sendAsync on ProducerImpl and that almost worked but
> then I ran into the same impl vs interface issue with another class
> (MessageBuilder) and decided I better figure this issue out once and for
> all.
>
> Any ideas?
>
> -kt
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to