All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.lightflame.nsqconsumer.FlameNsqContext Maven / Gradle / Ivy

The newest version!
package io.lightflame.nsqconsumer;

import io.netty.channel.ChannelHandlerContext;

/**
 * FlameNsqCtx
 */
public class FlameNsqContext {

    private long timeStamp;
    private String msgId;
    private String msg;
    private ChannelHandlerContext ctx;
    private NsqCommands cmds = new NsqCommands();

    FlameNsqContext(long timeStamp, String msgId, String msg, ChannelHandlerContext ctx) {
        this.timeStamp = timeStamp;
        this.msgId = msgId;
        this.msg = msg;
        this.ctx = ctx;
    }

    void ack(){
        cmds.ack(this.ctx, this.msgId);
    }

    public String getMsg() {
        return msg;
    }

    public long getTimeStamp() {
        return timeStamp;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy