Code Monkey home page Code Monkey logo

Comments (5)

olme04 avatar olme04 commented on June 12, 2024

Hey, looks like you just build empty metadata in request.
It should be:

metadata(RoutingMetadata("subscribe.user"))

instead of:

metadata {
  RoutingMetadata("subscribe.user")
}

when building payload via buildPayload

from rsocket-kotlin.

nikedlab avatar nikedlab commented on June 12, 2024

Hey @olme04 Thank you for answer
I've checked this way also and having another error

Screenshot 2022-04-08 at 10 54 47

Screenshot 2022-04-08 at 10 49 50

from rsocket-kotlin.

olme04 avatar olme04 commented on June 12, 2024

I see, that you are using composite metadata in setup payload, so looks like your server only supports it.
So you should also use composite metadata (same as you used in setup payload) for requests:

buildPayload {
  compositeMetadata {
    add(RoutingMetadata("subscribe.user"))
  }
  data(ByteReadPacket.Empty)
}

Also, it will be better to change metadata mime type in setup payload to composite metadata:

payloadMimeType = PayloadMimeType(
  data = WellKnownMimeType.ApplicationOctetStream,
  metadata = WellKnownMimeType.MessageRSocketCompositeMetadata
)

I don't now about your server implementation, but this can also affect how it will decode metadata.
In this case, you should also use compositeMetadata builder in all future requests.

from rsocket-kotlin.

nikedlab avatar nikedlab commented on June 12, 2024

Finally! Thank you
So problem was in wrong mime type for metadata

from rsocket-kotlin.

olme04 avatar olme04 commented on June 12, 2024

I'm glad that I could help you!

from rsocket-kotlin.

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.