This commit is contained in:
parent
ffed92fe39
commit
e699b878e0
@ -6,7 +6,11 @@ import com.kmalbz.api.model.SampleObject
|
||||
import com.kmalbz.database.service.IInputObjectService
|
||||
import com.rabbitmq.client.BuiltinExchangeType
|
||||
import com.rabbitmq.client.ConnectionFactory
|
||||
import com.rabbitmq.client.MessageProperties
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import com.viartemev.thewhiterabbit.channel.confirmChannel
|
||||
import com.viartemev.thewhiterabbit.channel.publish
|
||||
import com.viartemev.thewhiterabbit.publisher.OutboundMessage
|
||||
import io.ktor.application.call
|
||||
import io.ktor.config.HoconApplicationConfig
|
||||
import io.ktor.http.HttpStatusCode
|
||||
@ -96,7 +100,11 @@ class InputServiceServer {
|
||||
resultObjectService.addOne(currentApiObject)
|
||||
}
|
||||
|
||||
channel.basicPublish(rabbitExchangeName,"" , null, tag.toString().toByteArray())
|
||||
connection.confirmChannel {
|
||||
publish {
|
||||
publishWithConfirm(OutboundMessage(rabbitExchangeName, "", MessageProperties.PERSISTENT_BASIC, tag.toString()))
|
||||
}
|
||||
}
|
||||
|
||||
call.respond(currentApiObject)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user