Skip to content

채팅 보내면 바로바로 반영 안되는 문제 #95

Description

@lee-june-young

Is your feature request related to a problem? Please describe.
image
내가 보낸 채팅을 띄워주기 위해 initRabbitMQSetting()에서

image

deliverCallback을 불려지게 해서 내가 보낸 채팅을 띄워주는 로직 같은데,

channel.basicConsume(QUEUE_NAME, true, deliverCallback) { consumerTag: String? -> }
이걸 하면 deliverCallback이 불려져야하는 것 같은데, 안 불려져서 이상해서 찾아봤더니

Describe the solution you'd like
channel.basicPublish("", queueName, null, messageBytes)
이런 코드가 있어야 큐에 메세지가 들어가는 것 같던데, 우리 코드엔 큐에 메세지 넣는 코드가 없더라고요?
메세지가 안들어가니까 deliverCallback이 안불려져서 그런거 아닐까 유추하고 있습니다 :>
(근데 api에서 이 역할을 대신 해줘서 안 쓴건가 궁금)

Describe alternatives you've considered
아직은 없습니다. 나갔다 들어오며 메세지가 다 잘 불려와 지니까. 채팅을 보낼 때마다 나갔다 들어오는 효과를 만들면 되지 않을까 생각했으나, deliverCallback이 문제라면 상대방이 메세지를 보냈을 때도 바로바로 업데이트가 안될 것 같아서 이 방법이 안통할 것 같기도 합니다..

Additional context
deliverCallback만 메세지 보내고,받을 때 불려지면 rvadapter에서 notifydatachanged에 의해서 실시간으로 ui가 변할 것 같은데 그게 안돼서 일어나는 문제 같은데 루나 생각은 어떠하신지요?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is neededquestionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions