As Vasil said - you can bind the messages to ids (component doesn't necessarily need to exist for that id'
FacesContext.getCurrentInstance().addMessage("idspecified", new FacesMessage("Header", "body"));
And then in your xhtml use
<p:message for="idspecified" />