Websocket push messages with Spring Boot - STOMP - Part 1

Sdílet
Vložit
  • čas přidán 22. 01. 2021
  • Short tutorial on how to use websocket to push some STOMP messages on specified topics to the frontend using Spring Boot. Same approach can be used for push notifications.
    In this video we take a look how to configure websocket and how to create needed endpoints.
    Spring Initializr: start.spring.io/
    Source code: github.com/liliumbosniacum/we...
    Intro by Audionautix is licensed under a Creative Commons Attribution 4.0 licence. creativecommons.org/licenses/
    Artist: audionautix.com/

Komentáře • 27

  • @Hufsa
    @Hufsa Před 2 lety +1

    This is a great explanation, I liked how you speak, your ideas are clear and you express with the exact amount of words, you went to the point better than any other tutorial and it's cool how this is separated in more than 1 video, really good.

  • @JannisAdmek
    @JannisAdmek Před 3 lety +2

    You are very clear in your explanations, subbed :)

  • @karimmesghouni8289
    @karimmesghouni8289 Před 2 lety

    It was really helpful,thank you.

  • @francksgenlecroyant
    @francksgenlecroyant Před 2 lety

    Thanks man, you have got a new sub !

  • @hongchangmoj
    @hongchangmoj Před 2 lety

    thanks from south korea!

  • @cyesoft
    @cyesoft Před 2 lety

    I would have loved a short demo. There is a thread showing pretty much the same thing, I thought you would build upon that.

  • @alikalema1154
    @alikalema1154 Před 3 lety +7

    great explanation but the ide font size is small

  • @sreenaths5563
    @sreenaths5563 Před 2 lety +1

    Thanks for this video, but one suggestion, it will be better if you scale up the entire font size for greater readability. The vacant spaces all over the window can be utilised.

  • @xuli-pf6vh
    @xuli-pf6vh Před rokem

    Hello, I have a problem. When I upgraded the Spring Boot version to 2.7.5, the client came to the server for the first subscription. At this time, the stomp server sent the message to the client using the convertAndSendToUser() method. The client could not receive the message. The second subscription of the same connection could normally receive the message from the stomp server. Look forward to your reply.

  • @ajisegirisunday2885
    @ajisegirisunday2885 Před rokem +1

    How can we make the principal name dynamic in defaulthandshakehandler.. I tried passing headers but it showing null at the backend

    • @ajisegirisunday2885
      @ajisegirisunday2885 Před rokem

      For someone having this issue.. I used a request param.. Attach a param in the connect url and extract in the backend(defaulthandshakehandler) and then use it as principal name.. I tried using headers but for some reasons it didn't work..

  • @mostafamedhat2225
    @mostafamedhat2225 Před 2 lety

    very good explanation, but it is not working with me while using postman websocket feature and send messages to topic

    • @liliumbosniacumcode
      @liliumbosniacumcode  Před 2 lety

      Thank you. Which error do you get, do you get any ? Try adding some logs in your code to see if you hit the right places.

  • @davidanwar6996
    @davidanwar6996 Před 2 lety +2

    the code is too small

  • @gajanankanekar9118
    @gajanankanekar9118 Před 18 dny

    Cannot read your screen

  • @ramin2881
    @ramin2881 Před rokem

    Thanks for videos. Question is if an android or iOS client want to recieve notification does this implementation works fine?

    • @liliumbosniacumcode
      @liliumbosniacumcode  Před rokem

      For android and iOS notifications I would recomend using something like firebase

    • @ramin2881
      @ramin2881 Před rokem

      @@liliumbosniacumcode assume we can't use firebase, whats matter with websocket?

    • @liliumbosniacumcode
      @liliumbosniacumcode  Před rokem

      @@ramin2881 It is also possible to go with websocket, but I must say I have never done it.

  • @florinbujoreanu1020
    @florinbujoreanu1020 Před 21 dnem

    My man, what font is this? Looks like something custom, merging Cascadia with DejaVu.

    • @liliumbosniacumcode
      @liliumbosniacumcode  Před 20 dny

      If you are asking about IDE font, it is just a default one that comes with Intellij Idea

  • @expertsystem6379
    @expertsystem6379 Před 2 lety +1

    If you are creating video, and wanted it to be seen and peoples praise you. Why don't increase font so People's can also see your code without connecting to some big screen? 🤣

  • @haotianzhu5440
    @haotianzhu5440 Před 2 lety

    Really great video made! I Tried to implement your config to my project and "nested exception is java.lang.RuntimeException: Unable to parse response body for Response{requestLine=PUT /person/_doc/1234?timeout=1m HTTP/1.1, host=localhost:9200, response=HTTP/1.1 201 Created}] with root cause" occurred... Same error when I downloaded and ran your demo. Any idea how to fix it?