Hi, all.
We deploy an openfire server at our Linux OS, login in with a user, create a pubsub node.
Then I start a timer job to publish message to this node, this timer job publish a message to node every second.
Then I login the openfire Admin Console, I can see the used memory increasing more and more, from 70MB to 300MB. And then the server throw an OutOfMemoryError, and refuse to receive connection too.
Will anybody know how to resolve this problem?
Here is my IQ for create node:
public class CreateNodeRequest extends IQ {
private String topic;
@Override
public String getChildElementXML() {
StringBuilder buf = new StringBuilder();
buf.append("<pubsub xmlns='[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)'>");
buf.append("<create node=");
buf.append("’" + topic + “’/>”);
buf.append("");
buf.append("");
buf.append("");
return buf.toString();
}
public String getTopic() {
return topic;
}
public void setTopic(String topic) {
this.topic = topic;
}
}
And here is my IQ for send pubsub message:
public class PublishRequest extends IQ {
private String message;
private String topic;
@Override
public String getChildElementXML() {
StringBuilder buf = new StringBuilder();
buf.append("<pubsub xmlns='[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)'>");
buf.append("<publish node="" + topic + “”>");
buf.append("");
buf.append(message);
buf.append("");
buf.append("");
buf.append("");
return buf.toString();
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getTopic() {
return topic;
}
public void setTopic(String topic) {
this.topic = topic;
}
}